| 1 |
#include <stdio.h> |
| 2 |
#include <ticables.h> |
| 3 |
|
| 4 |
#define PRINTF(FUNCTION, TYPE, ...) \ |
| 5 |
fprintf(stderr, "%d\t" TYPE "\n", __LINE__, FUNCTION(__VA_ARGS__)) |
| 6 |
|
| 7 |
#define PRINTFVOID(FUNCTION, ...) \ |
| 8 |
FUNCTION(__VA_ARGS__); fprintf(stderr, "%d\n", __LINE__) |
| 9 |
|
| 10 |
#define INT "%d" |
| 11 |
#define UINT "%u" |
| 12 |
#define PTR "%p" |
| 13 |
#define STR "\"%s\"" |
| 14 |
|
| 15 |
int main(int argc, char **argv) |
| 16 |
{ |
| 17 |
ticables_library_init(); |
| 18 |
|
| 19 |
|
| 20 |
PRINTF(ticables_error_get, INT, -1, NULL); |
| 21 |
PRINTFVOID(ticables_error_free, NULL); |
| 22 |
|
| 23 |
PRINTF(ticables_handle_new, PTR, -1, -1); |
| 24 |
PRINTF(ticables_handle_del, INT, NULL); |
| 25 |
PRINTF(ticables_options_set_timeout, INT, NULL, -1); |
| 26 |
PRINTF(ticables_options_set_delay, INT, NULL, -1); |
| 27 |
PRINTF(ticables_get_model, INT, NULL); |
| 28 |
PRINTF(ticables_get_port, INT, NULL); |
| 29 |
PRINTF(ticables_get_device, STR, NULL); |
| 30 |
PRINTF(ticables_handle_show, INT, NULL); |
| 31 |
|
| 32 |
PRINTF(ticables_cable_open, INT, NULL); |
| 33 |
PRINTF(ticables_cable_close, INT, NULL); |
| 34 |
PRINTF(ticables_cable_reset, INT, NULL); |
| 35 |
PRINTF(ticables_cable_probe, INT, NULL, (void *)0x12345678); |
| 36 |
PRINTF(ticables_cable_set_device, INT, NULL, (void *)0x12345678); |
| 37 |
PRINTF(ticables_cable_set_device, INT, (void *)0x12345678, NULL); |
| 38 |
PRINTF(ticables_cable_send, INT, NULL, (void *)0x12345678, -1); |
| 39 |
PRINTF(ticables_cable_recv, INT, NULL, (void *)0x12345678, -1); |
| 40 |
PRINTF(ticables_cable_check, INT, NULL, (void *)0x12345678); |
| 41 |
PRINTF(ticables_cable_set_d0, INT, NULL, -1); |
| 42 |
|
| 43 |
PRINTF(ticables_cable_set_d1, INT, NULL, -1); |
| 44 |
PRINTF(ticables_cable_get_d0, INT, NULL); |
| 45 |
PRINTF(ticables_cable_get_d1, INT, NULL); |
| 46 |
PRINTF(ticables_cable_set_raw, INT, NULL, 0); |
| 47 |
PRINTF(ticables_cable_get_raw, INT, NULL, (void *)0x12345678); |
| 48 |
PRINTF(ticables_cable_get_raw, INT, (void *)0x12345678, NULL); |
| 49 |
PRINTF(ticables_progress_reset, INT, NULL); |
| 50 |
PRINTF(ticables_progress_get, INT, NULL, NULL, NULL, NULL); |
| 51 |
PRINTF(ticables_cable_put, INT, NULL, -1); |
| 52 |
PRINTF(ticables_cable_get, INT, NULL, (void *)0x12345678); |
| 53 |
|
| 54 |
PRINTF(ticables_cable_get_pre_send_hook, PTR, NULL); |
| 55 |
PRINTF(ticables_cable_set_pre_send_hook, PTR, NULL, (void *)0x12345678); |
| 56 |
PRINTF(ticables_cable_get_post_send_hook, PTR, NULL); |
| 57 |
PRINTF(ticables_cable_set_post_send_hook, PTR, NULL, (void *)0x12345678); |
| 58 |
PRINTF(ticables_cable_get_pre_recv_hook, PTR, NULL); |
| 59 |
PRINTF(ticables_cable_set_pre_recv_hook, PTR, NULL, (void *)0x12345678); |
| 60 |
PRINTF(ticables_cable_get_post_recv_hook, PTR, NULL); |
| 61 |
PRINTF(ticables_cable_set_post_recv_hook, PTR, NULL, (void *)0x12345678); |
| 62 |
PRINTF(ticables_cable_get_event_hook, PTR, NULL); |
| 63 |
PRINTF(ticables_cable_set_event_hook, PTR, NULL, (void *)0x12345678); |
| 64 |
|
| 65 |
PRINTF(ticables_cable_get_event_user_pointer, PTR, NULL); |
| 66 |
PRINTF(ticables_cable_set_event_user_pointer, PTR, NULL, (void *)0x12345678); |
| 67 |
PRINTF(ticables_cable_get_event_count, UINT, NULL); |
| 68 |
PRINTF(ticables_cable_fire_user_event, INT, NULL, 0, 0, (void *)0x12345678, 0); |
| 69 |
|
| 70 |
PRINTF(ticables_model_to_string, STR, -1); |
| 71 |
PRINTF(ticables_string_to_model, INT, NULL); |
| 72 |
PRINTF(ticables_port_to_string, STR, -1); |
| 73 |
PRINTF(ticables_string_to_port, INT, NULL); |
| 74 |
PRINTF(ticables_usbpid_to_string, STR, -1); |
| 75 |
PRINTF(ticables_string_to_usbpid, INT, NULL); |
| 76 |
|
| 77 |
PRINTF(ticables_probing_do, INT, NULL, -1, -1); |
| 78 |
PRINTF(ticables_probing_finish, INT, NULL); |
| 79 |
PRINTFVOID(ticables_probing_show, NULL); |
| 80 |
PRINTF(ticables_probing_found, INT, NULL); |
| 81 |
PRINTF(ticables_is_usb_enabled, INT); |
| 82 |
PRINTF(ticables_get_usb_devices, INT, NULL, NULL); |
| 83 |
PRINTF(ticables_free_usb_devices, INT, NULL); |
| 84 |
|
| 85 |
ticables_library_exit(); |
| 86 |
|
| 87 |
return 0; |
| 88 |
} |