bond save and load key with lfs is OK

This commit is contained in:
hathach committed 2018-10-19 14:51:42 +07:00
1 parent 61a9923b5e
commit ec007902c3
2 files changed
+5 -5

No files matched your search

+2 -2
View File
@@ -433,8 +433,8 @@ err_t AdafruitBluefruit::begin(uint8_t prph_count, uint8_t central_count)
// Create Timer for led advertising blinky
_led_blink_th = xTimerCreate(NULL, ms2tick(CFG_ADV_BLINKY_INTERVAL/2), true, NULL, bluefruit_blinky_cb);
// Initialize bonding
bond_init();
// Initialize bonding
bond_init();
return ERROR_NONE;
}
@@ -159,7 +159,7 @@ static void bond_save_cccd_dfr (uint8_t role, uint16_t conn_hdl, uint16_t ediv)
VERIFY(file,);
file.seek(0);
file.seek(file.read()); // skip key
file.seek(file.read() + file.position()); // skip key
file.seek(file.read() + file.position()); // skip name
file.write((uint8_t) len);
@@ -192,7 +192,7 @@ bool bond_load_cccd(uint8_t role, uint16_t cond_hdl, uint16_t ediv)
if ( file )
{
file.seek(file.read()); // skip key
file.seek(file.read() + file.position()); // skip key
file.seek(file.read() + file.position()); // skip name
uint16_t len = file.available();
@@ -231,7 +231,7 @@ void bond_print_list(uint8_t role)
while ( (file = dir.openNextFile(FILE_READ)) )
{
file.seek(file.read()); // skip key
file.seek(file.read() + file.position()); // skip key
uint8_t len = file.read();