clean up for porting - move platform specific stuff into outer project

This commit is contained in:
2018-07-07 23:02:58 +02:00
parent b8909fca06
commit 20639b77a6
35 changed files with 499 additions and 485 deletions
+3 -3
View File
@@ -4,8 +4,8 @@
// Enum of all defined resources
//
#ifndef GEX_F072_RSC_ENUM_H
#define GEX_F072_RSC_ENUM_H
#ifndef GEX_CORE_RSC_ENUM_H
#define GEX_CORE_RSC_ENUM_H
// X macro: Resource name,
#define XX_RESOURCES \
@@ -132,4 +132,4 @@ static inline void rscmap_free(ResourceMap *rscmap, Resource rsc)
#define RSC_CLAIM(rscmap, rsc) rscmap_claim(&rscmap, (rsc))
#define RSC_FREE(rscmap, rsc) rscmap_free(&rscmap, (rsc))
#endif //GEX_F072_RSC_ENUM_H
#endif //GEX_CORE_RSC_ENUM_H
+2 -1
View File
@@ -110,7 +110,7 @@ void settings_save(void)
erase.Banks = FLASH_BANK_1; // TODO ?????
#endif
#if defined(GEX_PLAT_F407_DISCOVERY)
#if GEX_PLAT_F407
// specialty for F4 with too much flash
erase.NbSectors = 1;
erase.Sector = SETTINGS_FLASH_SECTOR;
@@ -122,6 +122,7 @@ void settings_save(void)
erase.PageAddress = SETTINGS_FLASH_ADDR;
erase.TypeErase = FLASH_TYPEERASE_PAGES;
#endif
uint32_t pgerror = 0;
hst = HAL_FLASHEx_Erase(&erase, &pgerror);
assert_param(pgerror == 0xFFFFFFFFU);