|
sc-hsm-embedded
|
Data Structures | |
| struct | usb_device |
Defines | |
| #define | SCM_VENDOR_ID 0x04e6 |
| #define | SCM_SCR_35XX_DEVICE_ID 0x5410 |
| #define | SCM_SCR_3310_DEVICE_ID 0x5116 |
| #define | USB_WRITE_TIMEOUT (5 * 1000) |
| #define | USB_READ_TIMEOUT (3 * 1000) |
| #define | USB_OK 0 /* Successful completion */ |
| #define | ERR_NO_READER -1 /* Invalid parameter or value */ |
| #define | ERR_USB -2 /* USB error */ |
Typedefs | |
| typedef struct usb_device | usb_device_t |
Functions | |
| int | USB_Open (unsigned short pn, usb_device_t **device) |
| int | USB_Close (usb_device_t **device) |
| int | USB_Write (usb_device_t *device, unsigned int length, unsigned char *buffer) |
| int | USB_Read (usb_device_t *device, unsigned int *length, unsigned char *buffer) |
| #define ERR_NO_READER -1 /* Invalid parameter or value */ |
| #define ERR_USB -2 /* USB error */ |
| #define SCM_SCR_3310_DEVICE_ID 0x5116 |
Device ID for SCR 3310
| #define SCM_SCR_35XX_DEVICE_ID 0x5410 |
Device ID for SCR 355
| #define SCM_VENDOR_ID 0x04e6 |
Vendor ID for SCM Microsystems
| #define USB_OK 0 /* Successful completion */ |
| #define USB_READ_TIMEOUT (3 * 1000) |
Timeout value for reading data
| #define USB_WRITE_TIMEOUT (5 * 1000) |
Timeout value for writing data
| typedef struct usb_device usb_device_t |
Data structure encapsulating all information necessary to perform USB communication with a device, e.g. device handles, descriptors, bulk pipe ids.
| int USB_Close | ( | usb_device_t ** | device | ) |
| int USB_Open | ( | unsigned short | pn, |
| usb_device_t ** | device | ||
| ) |
Open USB device at the specified port and allocate necessary resources
| pn | Port number |
| device | Structure holding device specific data |
| int USB_Read | ( | usb_device_t * | device, |
| unsigned int * | length, | ||
| unsigned char * | buffer | ||
| ) |
| int USB_Write | ( | usb_device_t * | device, |
| unsigned int | length, | ||
| unsigned char * | buffer | ||
| ) |