Adding module ID description header definition.
authorNathael Pajani <nathael.pajani@ed3l.fr>
Mon, 11 Mar 2013 16:26:37 +0000 (17:26 +0100)
committerNathael Pajani <nathael.pajani@ed3l.fr>
Tue, 8 Nov 2022 16:03:04 +0000 (17:03 +0100)
include/drivers/i2c.h

index a498303..1df0e4e 100644 (file)
@@ -71,6 +71,22 @@ enum i2c_state_machine_states {
        I2C_DATA_NACK = 0x58,
 };
 
+#define UEXT_MOD_HAS_NONE  0
+#define UEXT_MOD_HAS_UART (1 << 0)
+#define UEXT_MOD_HAS_I2C  (1 << 1)
+#define UEXT_MOD_HAS_SPI  (1 << 2)
+
+struct module_desc {
+       uint16_t serial_number;
+       uint8_t version;
+       uint8_t header_size;
+       uint8_t capabilities; /* Bit mask of UEXT_MOD_HAS_* */
+       uint8_t name_offset;
+       uint8_t name_size;
+       uint8_t image_offset;
+       uint16_t image_size;
+} __attribute__ ((packed));
+
 enum i2c_eeprom_type {
        EEPROM_TYPE_NONE = 0,
        EEPROM_TYPE_SMALL,