Merge branch 'dev' into epr-pinecil-og

This commit is contained in:
Ben V. Brown
2022-10-23 23:00:00 +11:00
committed by GitHub
41 changed files with 824 additions and 739 deletions

View File

@@ -10,10 +10,8 @@
#include "gd32vf103_libopt.h"
#include "string.h"
#define FMC_PAGE_SIZE ((uint16_t)0x400U)
// static uint16_t settings_page[FMC_PAGE_SIZE] __attribute__ ((section (".settings_page")));
// Linker script doesnt want to play, so for now its hard coded
#define SETTINGS_START_PAGE (0x08000000 + (127 * 1024))
uint8_t flash_save_buffer(const uint8_t *buffer, const uint16_t length) {
void flash_save_buffer(const uint8_t *buffer, const uint16_t length) {
/* unlock the flash program/erase controller */
fmc_unlock();
@@ -34,7 +32,6 @@ uint8_t flash_save_buffer(const uint8_t *buffer, const uint16_t length) {
resetWatchdog();
}
fmc_lock();
return 1;
}
void flash_read_buffer(uint8_t *buffer, const uint16_t length) {