address review comments

Dan Halbert 3 years ago
parent 0367ba7495
commit 85dc4089b9

@ -92,6 +92,7 @@ void bonding_erase_storage(void) {
// Given NULL to start or block address, return the address of the next valid block.
// The last block returned is the unused block at the end.
// Return NULL if we have run off the end of the bonding space.
STATIC bonding_block_t *next_block(bonding_block_t *block) {
while (1) {
// Advance to next block.
@ -127,10 +128,6 @@ STATIC bonding_block_t *find_existing_block(bool is_central, bonding_block_type_
if (block == NULL) {
return NULL;
if (block->type == BLOCK_INVALID) {
// Skip discarded blocks.
// If types match, and block is unused, just return it.
// Otherwise check that is_central and ediv match.
if (type == block->type) {

@ -89,7 +89,7 @@ bool sd_flash_write_sync(uint32_t *dest_words, uint32_t* src_words, uint32_t num
// location before an erase is necessary, even if the write is all
// ones (erased state). So we can't avoid erases even if the page
// appears to be already erased (all ones), unless we keep track of
// writes to a page.g
// writes to a page.
bool nrf_nvm_safe_flash_page_write(uint32_t page_addr, uint8_t *data) {