mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-03 23:47:08 +00:00
btstack_hal_flash_memory: fix write of 0xff bytes to simulated flash, fix #283
This commit is contained in:
parent
63efc2ed25
commit
3f054530e4
@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
||||
- pbap_client: fix PBAP UUID len on connect message
|
||||
- sm: fix secure connection pairing as peripheral when local user confirmation happens after remote one
|
||||
- A2DP Source: only connect to remote sink stream endpoints
|
||||
- btstack_hal_flash_memory: fix write of 0xff bytes to simulated flash
|
||||
|
||||
### Added
|
||||
- example/le_mitm: MITM implementation that forwards ATT PDUs and allows for pairing
|
||||
|
@ -89,7 +89,10 @@ static void hal_flash_bank_memory_write(void * context, int bank, uint32_t offse
|
||||
int i;
|
||||
for (i=0;i<size;i++){
|
||||
// write 0xff doesn't change anything
|
||||
if (data[i] == 0xff) continue;
|
||||
if (data[i] == 0xff) {
|
||||
offset++;
|
||||
continue;
|
||||
}
|
||||
// writing something other than 0x00 is only allowed once
|
||||
if (self->banks[bank][offset] != 0xff && data[i] != 0x00){
|
||||
log_error("Error: offset %u written twice. Data: 0x%02x!", offset+i, data[i]);
|
||||
|
Loading…
Reference in New Issue
Block a user