Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
yubihsm_usb.h
Go to the documentation of this file.
1/*
2 * Copyright 2015-2018 Yubico AB
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef YUBIHSM_USB_H
18#define YUBIHSM_USB_H
19
20#ifndef __WIN32
21#define YH_INTERNAL __attribute__((visibility("hidden")))
22#else
23#define YH_INTERNAL
24#endif
25
30int YH_INTERNAL usb_write(yh_backend *state, unsigned char *buf,
31 long unsigned len);
32int YH_INTERNAL usb_read(yh_backend *state, unsigned char *buf,
33 long unsigned *len);
35
36#endif
uint32_t serial
size_t len
uint8_t buf[2048]
void YH_INTERNAL usb_close(yh_backend *state)
yh_backend YH_INTERNAL * backend_create(void)
int YH_INTERNAL usb_read(yh_backend *state, unsigned char *buf, long unsigned *len)
void YH_INTERNAL usb_set_serial(yh_backend *state, unsigned long serial)
bool YH_INTERNAL usb_open_device(yh_backend *backend)
int YH_INTERNAL usb_write(yh_backend *state, unsigned char *buf, long unsigned len)
void YH_INTERNAL usb_destroy(yh_backend **state)
#define YH_INTERNAL
Definition yubihsm_usb.h:21