diff options
Diffstat (limited to 'include/eeprom.h')
-rw-r--r-- | include/eeprom.h | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/include/eeprom.h b/include/eeprom.h index 70290e17d4..fd2ff21d71 100644 --- a/include/eeprom.h +++ b/include/eeprom.h @@ -10,26 +10,46 @@ #include "common.h" -/* Initializes the module. */ +/** + * Initialize the module. + */ int eeprom_init(void); -/* Returns the number of EEPROM blocks on the system. */ +/** + * Returns the number of EEPROM blocks on the system. + */ int eeprom_get_block_count(void); -/* Returns the EEPROM block size in bytes. */ +/** + * Return the EEPROM block size in bytes. + */ int eeprom_get_block_size(void); -/* Reads <size> bytes of data from <offset> in <block> of EEPROM. Offset - * and size must be a multiple of 32 bits. */ +/** + * Read data from EEPROM. + * + * @param block Block number + * @param offset Byte offset in block; must be multiple of 4. + * @param size Number of bytes to read; must be multiple of 4. + * @param data Destination for data + */ int eeprom_read(int block, int offset, int size, char *data); -/* Writes <size> bytes of data to <offset> in <block> of EEPROM. Offset - * and size must be a multiple of 32 bits. */ +/** + * Write data to EEPROM. + * + * @param block Block number + * @param offset Byte offset in block; must be multiple of 4. + * @param size Number of bytes to write; must be multiple of 4. + * @param data Data to write + */ int eeprom_write(int block, int offset, int size, const char *data); -/* Hides an EEPROM block until the next reset. */ +/** + * Hide an EEPROM block until the next reset. + * + * @param block Block number + */ int eeprom_hide(int block); -/* TODO: write protect */ - #endif /* __CROS_EC_EEPROM_H */ |