Brian Pearson
/
LPC1768USBIO
USB IO module
USBHIDProtocol.h@0:08e9f3bccfda, 2016-01-05 (annotated)
- Committer:
- BPPearson
- Date:
- Tue Jan 05 16:45:45 2016 +0000
- Revision:
- 0:08e9f3bccfda
USB IO module
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
BPPearson | 0:08e9f3bccfda | 1 | #ifndef USBHIDPROTOCOL_H_ |
BPPearson | 0:08e9f3bccfda | 2 | #define USBHIDPROTOCOL_H_ |
BPPearson | 0:08e9f3bccfda | 3 | /* Command list */ |
BPPearson | 0:08e9f3bccfda | 4 | // Devices verifies with same CMD and optional data |
BPPearson | 0:08e9f3bccfda | 5 | |
BPPearson | 0:08e9f3bccfda | 6 | // System commands |
BPPearson | 0:08e9f3bccfda | 7 | #define CMD_SYS_CHECK 0x00 // Args: return version |
BPPearson | 0:08e9f3bccfda | 8 | #define CMD_SYS_RESET 0xFF // Args: bool softreset |
BPPearson | 0:08e9f3bccfda | 9 | |
BPPearson | 0:08e9f3bccfda | 10 | // Miscellaneous |
BPPearson | 0:08e9f3bccfda | 11 | #define CMD_LED_OFF 0x10 // Args, int led 1..4 |
BPPearson | 0:08e9f3bccfda | 12 | #define CMD_LED_ON 0x11 // Args, int led 1..4 |
BPPearson | 0:08e9f3bccfda | 13 | |
BPPearson | 0:08e9f3bccfda | 14 | // Digital input commands |
BPPearson | 0:08e9f3bccfda | 15 | #define CMD_READ_DIG_INPUT 0x20 // Args, int channel, return int |
BPPearson | 0:08e9f3bccfda | 16 | #define CMD_READ_ALL_DIG_INPUTS 0x21 // No args, return int |
BPPearson | 0:08e9f3bccfda | 17 | |
BPPearson | 0:08e9f3bccfda | 18 | // Digital output commands |
BPPearson | 0:08e9f3bccfda | 19 | #define CMD_READ_DIG_OUTPUT 0x22 // Args, int channel, return int |
BPPearson | 0:08e9f3bccfda | 20 | #define CMD_READ_ALL_DIG_OUTPUTS 0x23 // No args, return int |
BPPearson | 0:08e9f3bccfda | 21 | #define CMD_WRITE_DIG_OUTPUT 0x24 // Args, int channel |
BPPearson | 0:08e9f3bccfda | 22 | #define CMD_WRITE_ALL_DIG_OUTPUTS 0x25 // Args, int output value |
BPPearson | 0:08e9f3bccfda | 23 | |
BPPearson | 0:08e9f3bccfda | 24 | // Analog input command |
BPPearson | 0:08e9f3bccfda | 25 | #define CMD_READ_ANALOG_INPUT 0x30 // Args, int channel, return int |
BPPearson | 0:08e9f3bccfda | 26 | |
BPPearson | 0:08e9f3bccfda | 27 | // Analog output command |
BPPearson | 0:08e9f3bccfda | 28 | #define CMD_WRITE_ANALOG_OUTPUT 0x31 // Args, int value |
BPPearson | 0:08e9f3bccfda | 29 | |
BPPearson | 0:08e9f3bccfda | 30 | #endif //USBHIDPROTOCOL_H_ |
BPPearson | 0:08e9f3bccfda | 31 |