testhal: EFL-MFS: move board-specific configuration to portab

This commit is contained in:
Andrey Gusakov 2023-11-03 11:15:43 +03:00
parent 9b6fa573de
commit b4debd2975
3 changed files with 16 additions and 10 deletions

View File

@ -24,6 +24,8 @@
#include "hal.h" #include "hal.h"
#include "hal_mfs.h"
#include "portab.h" #include "portab.h"
/*===========================================================================*/ /*===========================================================================*/
@ -34,6 +36,16 @@
/* Module exported variables. */ /* Module exported variables. */
/*===========================================================================*/ /*===========================================================================*/
const MFSConfig mfscfg1 = {
.flashp = (BaseFlash *)&EFLD1,
.erased = 0xFFFFFFFFU,
.bank_size = 4096U,
.bank0_start = 128U,
.bank0_sectors = 2U,
.bank1_start = 130U,
.bank1_sectors = 2U
};
/*===========================================================================*/ /*===========================================================================*/
/* Module local types. */ /* Module local types. */
/*===========================================================================*/ /*===========================================================================*/

View File

@ -39,6 +39,8 @@
#define PORTAB_SD1 SD2 #define PORTAB_SD1 SD2
#define PORTAB_EFLD EFLD1
/*===========================================================================*/ /*===========================================================================*/
/* Module pre-compile time settings. */ /* Module pre-compile time settings. */
/*===========================================================================*/ /*===========================================================================*/

View File

@ -25,15 +25,7 @@
#include "portab.h" #include "portab.h"
const MFSConfig mfscfg1 = { extern const MFSConfig mfscfg1;
.flashp = (BaseFlash *)&EFLD1,
.erased = 0xFFFFFFFFU,
.bank_size = 4096U,
.bank0_start = 128U,
.bank0_sectors = 2U,
.bank1_start = 130U,
.bank1_sectors = 2U
};
/* /*
* LED blinker thread, times are in milliseconds. * LED blinker thread, times are in milliseconds.
@ -70,7 +62,7 @@ int main(void) {
portab_setup(); portab_setup();
/* Starting EFL driver.*/ /* Starting EFL driver.*/
eflStart(&EFLD1, NULL); eflStart(&PORTAB_EFLD, NULL);
/* Starting a serial port for test report output.*/ /* Starting a serial port for test report output.*/
sdStart(&PORTAB_SD1, NULL); sdStart(&PORTAB_SD1, NULL);