1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
| typedef union DATA_PACKET
{
byte _byte[USBGEN_EP_SIZE]; //For byte access
word _word[USBGEN_EP_SIZE/2];//For word access(USBGEN_EP_SIZE msut be even)
struct
{
enum
{
READ_VERSION = 0x00,
ID_BOARD = 0x31,
UPDATE_LED = 0x32,
SET_TEMP_REAL = 0x33,
RD_TEMP = 0x34,
SET_TEMP_LOGGING= 0x35,
RD_TEMP_LOGGING = 0x36,
RD_POT = 0x37,
RESET = 0xFF
}CMD;
byte len;
};
struct
{
unsigned :8;
byte ID;
};
struct
{
unsigned :8;
byte led_num;
byte led_status;
};
struct
{
unsigned :8;
word word_data;
}; |
Partager