usbip list -r 127.0.0.1 now works.
[gnuk/gnuk.git] / emulation / glue.c
1 #include <stdint.h>
2
3 uint8_t _regnual_start;
4 uint8_t __heap_end__;
5
6 int
7 check_crc32 (const uint32_t *start_p, const uint32_t *end_p)
8 {
9   return 0;
10 }
11
12 uint8_t *
13 sram_address (uint32_t offset)
14 {
15   return ((uint8_t *)0x20000000) + offset;
16 }
17
18 const uint8_t sys_version[8] = {
19   3*2+2,             /* bLength */
20   0x03,              /* bDescriptorType = USB_STRING_DESCRIPTOR_TYPE */
21   /* sys version: "3.0" */
22   '3', 0, '.', 0, '0', 0,
23 };
24
25 void
26 led_blink (int spec)
27 {
28 }
29
30 void
31 ccid_usb_reset (int full)
32 {
33 }
34
35 void
36 ccid_card_change_signal (int how)
37 {
38 }
39
40 enum ccid_state {
41   CCID_STATE_NOCARD,            /* No card available */
42   CCID_STATE_START,             /* Initial */
43   CCID_STATE_WAIT,              /* Waiting APDU */
44                                 /* Busy1, Busy2, Busy3, Busy5 */
45   CCID_STATE_EXECUTE,           /* Busy4 */
46   CCID_STATE_RECEIVE,           /* APDU Received Partially */
47   CCID_STATE_SEND,              /* APDU Sent Partially */
48
49   CCID_STATE_EXITED,            /* ICC Thread Terminated */
50   CCID_STATE_EXEC_REQUESTED,    /* Exec requested */
51 };
52
53 static enum ccid_state ccid_state;
54 enum ccid_state *const ccid_state_p = &ccid_state;