diff options
| author | Dan Halbert <halbert@halwitz.org> | 2020-01-14 17:23:16 -0500 |
|---|---|---|
| committer | Dan Halbert <halbert@halwitz.org> | 2020-01-14 17:23:16 -0500 |
| commit | 85dc4089b9b2d721a3e4bfc68e252c0dda450137 (patch) | |
| tree | e7ce7dfdae116f3109087821633caa2e604ddc8f | |
| parent | 0367ba7495e209e38ff80934affe9e7fb3f04cff (diff) | |
address review comments
| -rw-r--r-- | ports/nrf/common-hal/_bleio/bonding.c | 5 | ||||
| -rw-r--r-- | ports/nrf/peripherals/nrf/nvm.c | 2 |
2 files changed, 2 insertions, 5 deletions
diff --git a/ports/nrf/common-hal/_bleio/bonding.c b/ports/nrf/common-hal/_bleio/bonding.c index 7ba589623..9716b3988 100644 --- a/ports/nrf/common-hal/_bleio/bonding.c +++ b/ports/nrf/common-hal/_bleio/bonding.c @@ -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. - continue; - } // If types match, and block is unused, just return it. // Otherwise check that is_central and ediv match. if (type == block->type) { diff --git a/ports/nrf/peripherals/nrf/nvm.c b/ports/nrf/peripherals/nrf/nvm.c index e8fcc9008..63b168f14 100644 --- a/ports/nrf/peripherals/nrf/nvm.c +++ b/ports/nrf/peripherals/nrf/nvm.c @@ -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) { #ifdef BLUETOOTH_SD |
