Add enum p4io_roundplug_type for clarity

This commit is contained in:
Will Toohey
2021-04-06 20:35:14 +10:00
parent 4222c6a1eb
commit d06d2c753d
+7 -2
View File
@@ -5,7 +5,7 @@
#define P4IO_SOF 0xAA #define P4IO_SOF 0xAA
enum p4ioemu_p4io_command { enum p4io_command {
P4IO_CMD_INIT = 0x00, P4IO_CMD_INIT = 0x00,
P4IO_CMD_GET_DEVICE_INFO = 0x01, P4IO_CMD_GET_DEVICE_INFO = 0x01,
P4IO_CMD_SET_PORTOUT = 0x12, P4IO_CMD_SET_PORTOUT = 0x12,
@@ -21,6 +21,11 @@ enum p4ioemu_p4io_command {
P4IO_CMD_DALLAS_READ_MEM = 0x41 P4IO_CMD_DALLAS_READ_MEM = 0x41
}; };
enum p4io_roundplug_type {
P4IO_ROUNDPLUG_BLACK = 0,
P4IO_ROUNDPLUG_WHITE = 1,
};
#define P4IO_CMD_HEADER_LEN 4 #define P4IO_CMD_HEADER_LEN 4
#define P4IO_MAX_PAYLOAD 60 #define P4IO_MAX_PAYLOAD 60
@@ -37,7 +42,7 @@ struct p4io_cmd_package {
}; };
struct p4io_req_read_roundplug { struct p4io_req_read_roundplug {
/* 0 = black, 1 = white */ // see enum p4io_roundplug_type
uint8_t type; uint8_t type;
}; };