mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-04 22:17:01 +08:00
[stm32] settings_arch: silence warning on F4
persisent settings is not implemented on F4 yet, pflash_program_bytes is a no-op.
This commit is contained in:
@@ -190,12 +190,11 @@ static int32_t flash_detect(struct FlashInfo* flash) {
|
|||||||
// (gdb) p *flash
|
// (gdb) p *flash
|
||||||
// $1 = {addr = 134739968, total_size = 524288, page_nr = 255, page_size = 2048}
|
// $1 = {addr = 134739968, total_size = 524288, page_nr = 255, page_size = 2048}
|
||||||
// 0x807F800 0x80000
|
// 0x807F800 0x80000
|
||||||
|
#if defined(STM32F1)
|
||||||
static int32_t pflash_program_bytes(struct FlashInfo* flash,
|
static int32_t pflash_program_bytes(struct FlashInfo* flash,
|
||||||
uint32_t src,
|
uint32_t src,
|
||||||
uint32_t size,
|
uint32_t size,
|
||||||
uint32_t chksum) {
|
uint32_t chksum) {
|
||||||
#if defined(STM32F1)
|
|
||||||
uint32_t i;
|
uint32_t i;
|
||||||
|
|
||||||
/* erase */
|
/* erase */
|
||||||
@@ -236,12 +235,18 @@ static int32_t pflash_program_bytes(struct FlashInfo* flash,
|
|||||||
}
|
}
|
||||||
if (*(uint32_t*) (flash->addr+flash->page_size-FSIZ) != size) return -3;
|
if (*(uint32_t*) (flash->addr+flash->page_size-FSIZ) != size) return -3;
|
||||||
if (*(uint32_t*) (flash->addr+flash->page_size-FCHK) != chksum) return -4;
|
if (*(uint32_t*) (flash->addr+flash->page_size-FCHK) != chksum) return -4;
|
||||||
#elif defined(STM32F4)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#elif defined(STM32F4)
|
||||||
|
static int32_t pflash_program_bytes(struct FlashInfo* flash __attribute__((unused)),
|
||||||
|
uint32_t src __attribute__((unused)),
|
||||||
|
uint32_t size __attribute__((unused)),
|
||||||
|
uint32_t chksum __attribute__((unused))) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
int32_t persistent_write(uint32_t ptr, uint32_t size) {
|
int32_t persistent_write(uint32_t ptr, uint32_t size) {
|
||||||
struct FlashInfo flash_info;
|
struct FlashInfo flash_info;
|
||||||
|
|||||||
Reference in New Issue
Block a user