fix ambiguous comment (word->halfword)

This commit is contained in:
NIIBE Yutaka
2010-11-08 10:17:27 +09:00
parent 24a3430ce4
commit bb16bc47bb
2 changed files with 10 additions and 10 deletions

View File

@@ -208,7 +208,7 @@ flash_data_pool_allocate (size_t size)
{ {
uint8_t *p = last_p; uint8_t *p = last_p;
size = (size + 1) & ~1; /* allocation unit is 1-word (2-byte) */ size = (size + 1) & ~1; /* allocation unit is 1-halfword (2-byte) */
if (last_p + size > data_pool - FLASH_DATA_POOL_HEADER_SIZE + FLASH_PAGE_SIZE) if (last_p + size > data_pool - FLASH_DATA_POOL_HEADER_SIZE + FLASH_PAGE_SIZE)
return NULL; /* XXX: here invoke gc/erase page/.../ */ return NULL; /* XXX: here invoke gc/erase page/.../ */
@@ -408,9 +408,9 @@ flash_cnt123_get_value (const uint8_t *p)
uint8_t v = *p; uint8_t v = *p;
/* /*
* After erase, a word in flash memory becomes 0xffff. * After erase, a halfword in flash memory becomes 0xffff.
* The word can be programmed to any value. * The halfword can be programmed to any value.
* Then, the word can be programmed to zero. * Then, the halfword can be programmed to zero.
* *
* Thus, we can represent value 1, 2, and 3. * Thus, we can represent value 1, 2, and 3.
*/ */

View File

@@ -187,8 +187,8 @@ extern uint8_t keystring_md_pw3[KEYSTRING_MD_SIZE];
/* /*
* Representation of data object: * Representation of data object:
* *
* <-1 word-> <--len/2 words-> * <-1 halfword-> <--len/2 halfwords->
* <tag><len> <-data content-> * <-tag-><-len-> <---data content--->
*/ */
#define NR_DO__FIRST__ 0x01 #define NR_DO__FIRST__ 0x01
#define NR_DO_SEX 0x01 #define NR_DO_SEX 0x01
@@ -212,7 +212,7 @@ extern uint8_t keystring_md_pw3[KEYSTRING_MD_SIZE];
#define NR_DO_KEYSTRING_RC 0x13 #define NR_DO_KEYSTRING_RC 0x13
#define NR_DO_KEYSTRING_PW3 0x14 #define NR_DO_KEYSTRING_PW3 0x14
#define NR_DO__LAST__ 21 /* == 0x15 */ #define NR_DO__LAST__ 21 /* == 0x15 */
/* 14-bit counter for DS: Recorded in flash memory by 1-word (2-byte). */ /* 14-bit counter for DS: Recorded in flash memory by 1-halfword (2-byte). */
/* /*
* Representation of 14-bit counter: * Representation of 14-bit counter:
* 0: 0x8000 * 0: 0x8000
@@ -221,7 +221,7 @@ extern uint8_t keystring_md_pw3[KEYSTRING_MD_SIZE];
* 16383: 0xbfff * 16383: 0xbfff
*/ */
#define NR_COUNTER_DS 0x80 /* ..0xbf */ #define NR_COUNTER_DS 0x80 /* ..0xbf */
/* 10-bit counter for DS: Recorded in flash memory by 1-word (2-byte). */ /* 10-bit counter for DS: Recorded in flash memory by 1-halfword (2-byte). */
/* /*
* Representation of 10-bit counter: * Representation of 10-bit counter:
* 0: 0xc000 * 0: 0xc000
@@ -230,7 +230,7 @@ extern uint8_t keystring_md_pw3[KEYSTRING_MD_SIZE];
* 1023: 0xc3ff * 1023: 0xc3ff
*/ */
#define NR_COUNTER_DS_LSB 0xc0 /* ..0xc3 */ #define NR_COUNTER_DS_LSB 0xc0 /* ..0xc3 */
/* 8-bit int or Boolean objects: Recorded in flash memory by 1-word (2-byte) */ /* 8-bit int or Boolean objects: Recorded in flash memory by 1-halfword (2-byte) */
/* /*
* Representation of Boolean object: * Representation of Boolean object:
* 0: No record in flash memory * 0: No record in flash memory
@@ -240,7 +240,7 @@ extern uint8_t keystring_md_pw3[KEYSTRING_MD_SIZE];
/* /*
* NR_BOOL_SOMETHING, NR_UINT_SOMETHING could be here... Use 0xf? * NR_BOOL_SOMETHING, NR_UINT_SOMETHING could be here... Use 0xf?
*/ */
/* 123-counters: Recorded in flash memory by 2-word (4-byte). */ /* 123-counters: Recorded in flash memory by 2-halfword (4-byte). */
/* /*
* Representation of 123-counters: * Representation of 123-counters:
* 0: No record in flash memory * 0: No record in flash memory