diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-10-24 09:31:41 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2013-10-25 20:12:49 +0000 |
commit | 17ea6d50f04dc3e287ab8a160d5db505377d57d5 (patch) | |
tree | 252d53242caa0c9e3f331d02cc41bb6dc3fab34b | |
parent | a88b23772990c4c331b12990fd337ba86fc3bf5a (diff) | |
download | chrome-ec-17ea6d50f04dc3e287ab8a160d5db505377d57d5.tar.gz |
cleanup: eeprom and option comments
No code changes, just updating comments.
BUG=chrome-os-partner:23558
BRANCH=none
TEST=compile bds project
Change-Id: I819244acafcf89a1e983bddecd82f770b0374ee1
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/174512
-rw-r--r-- | common/eoption.c | 4 | ||||
-rw-r--r-- | include/eeprom.h | 40 |
2 files changed, 32 insertions, 12 deletions
diff --git a/common/eoption.c b/common/eoption.c index 24879a76e0..2a3f64f846 100644 --- a/common/eoption.c +++ b/common/eoption.c @@ -119,8 +119,8 @@ void eoption_init(void) return; /* - * TODO: should have a CRC if we start using this for real - * (non-debugging) options. + * TODO(crosbug.com/p/23558): The header should really have a checksum + * field, so that we can detect uninitialized/corrupt data. */ /* Initialize fields which weren't set in previous versions */ 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 */ |