From: Nathael Pajani Date: Mon, 11 Mar 2013 16:26:37 +0000 (+0100) Subject: Adding module ID description header definition. X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=833b5ed777ffb486001cefe14be34c617125c13a;p=soft%2Flpc122x%2Fcore Adding module ID description header definition. --- diff --git a/include/drivers/i2c.h b/include/drivers/i2c.h index a498303..1df0e4e 100644 --- a/include/drivers/i2c.h +++ b/include/drivers/i2c.h @@ -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,