25 lines
509 B
C
25 lines
509 B
C
#include <stdarg.h>
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
#include <windows.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" { /* Assume C declarations for C++ */
|
|
#endif /* __cplusplus */
|
|
#pragma pack(push,1)
|
|
|
|
#define WRITE_DIRECTION 0
|
|
|
|
#define READ_DIRECTION 1
|
|
|
|
typedef struct WinUsbDevice WinUsbDevice;
|
|
|
|
HANDLE initialize_usb(void);
|
|
|
|
void write_usb(struct WinUsbDevice *device, const uint8_t *data, uintptr_t len);
|
|
|
|
#pragma pack(pop)
|
|
#ifdef __cplusplus
|
|
} /* End of extern "C" { */
|
|
#endif |