sdk_system_rtc_mem_read: Fix destination buffer pointer
This commit is contained in:
parent
e3827b2f1c
commit
701a4c4284
1 changed files with 2 additions and 2 deletions
|
@ -110,7 +110,7 @@ bool IRAM sdk_system_rtc_mem_write(uint32_t des_addr, void *src_addr, uint16_t s
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IRAM sdk_system_rtc_mem_read(uint32_t src_addr, void *des_addr, uint16_t save_size) {
|
bool IRAM sdk_system_rtc_mem_read(uint32_t src_addr, void *des_addr, uint16_t save_size) {
|
||||||
uint32_t volatile *src_buf = (uint32_t *)src_addr;
|
uint32_t *dest_buf = (uint32_t *)des_addr;
|
||||||
|
|
||||||
if (src_addr > 191) {
|
if (src_addr > 191) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -125,7 +125,7 @@ bool IRAM sdk_system_rtc_mem_read(uint32_t src_addr, void *des_addr, uint16_t sa
|
||||||
save_size = (save_size & ~3) + 4;
|
save_size = (save_size & ~3) + 4;
|
||||||
}
|
}
|
||||||
for (uint8_t i = 0; i < (save_size >> 2); i++) {
|
for (uint8_t i = 0; i < (save_size >> 2); i++) {
|
||||||
src_buf[i] = RTCMEM_SYSTEM[i];
|
dest_buf[i] = RTCMEM_SYSTEM[i];
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue