/** * @file include/di_fw/24xx.h * @brief Microchip 24xx EEPROM driver * @date March 22, 2016 * @author J.J.J. Jacobs * @copyright 2016 Dual Inventive Technology Centre B.V. * * Microchip Microchip 24XX EEPROM low-level driver for di_config_ctx */ #ifndef INCLUDE_DI_FW_24XX_H_ #define INCLUDE_DI_FW_24XX_H_ #include #include /* * List possible EEPROM devices for 24xxx driver */ #define EEPROM_24XXX 1 #define EEPROM_24AA02 2 /** * read the EEPROM redudant aware. Return DNE_FIRMWARE_EEPROM in case of failure * @param ctx config context * @param offset the offset where the read starts * @param data pointer to where the read data needs to be written * @param size size of the to be read data */ enum di_errno di_fw_24xx_read(struct di_config_ctx *ctx, uint32_t offset, void *data, size_t size); /** * write the EEPROM redudant aware. Return DNE_FIRMWARE_EEPROM in case of failure * @param ctx config context * @param offset the offset where the write starts * @param data pointer to the write data * @param size size of the to be written data */ enum di_errno di_fw_24xx_write(struct di_config_ctx *ctx, uint32_t offset, const void *data, size_t size); #endif /* INCLUDE_DI_FW_24XX_H_ */