Merge pull request #2209 from opentx/bsongis/sky9x_eeprom
EEPROM on Sky9x
This commit is contained in:
@@ -81,3 +81,28 @@ void eeLoadModelHeaders()
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void eeReadAll()
|
||||
{
|
||||
if (!eepromOpen() || !eeLoadGeneral()) {
|
||||
eeErase(true);
|
||||
}
|
||||
else {
|
||||
eeLoadModelHeaders();
|
||||
}
|
||||
|
||||
stickMode = g_eeGeneral.stickMode;
|
||||
|
||||
#if defined(CPUARM)
|
||||
for (uint8_t i=0; languagePacks[i]!=NULL; i++) {
|
||||
if (!strncmp(g_eeGeneral.ttsLanguage, languagePacks[i]->id, 2)) {
|
||||
currentLanguagePackIdx = i;
|
||||
currentLanguagePack = languagePacks[i];
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(CPUARM)
|
||||
eeLoadModel(g_eeGeneral.currModel);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -55,7 +55,6 @@ void eeDirty(uint8_t msk);
|
||||
void eeCheck(bool immediately);
|
||||
void eeReadAll();
|
||||
bool eeModelExists(uint8_t id);
|
||||
void eeLoadModelName(uint8_t id, char *name);
|
||||
void eeLoadModel(uint8_t id);
|
||||
bool eeConvert();
|
||||
void eeErase(bool warn);
|
||||
|
||||
+377
-458
File diff suppressed because it is too large
Load Diff
+31
-56
@@ -40,69 +40,44 @@
|
||||
#include <inttypes.h>
|
||||
#include <stdint.h>
|
||||
|
||||
// States in Eeprom32_process_state
|
||||
#define E32_IDLE 1
|
||||
#define E32_ERASESENDING 2
|
||||
#define E32_ERASEWAITING 3
|
||||
#define E32_WRITESENDING 4
|
||||
#define E32_WRITEWAITING 5
|
||||
#define E32_READSENDING 6
|
||||
#define E32_READWAITING 7
|
||||
#define E32_BLANKCHECK 8
|
||||
#define E32_WRITESTART 9
|
||||
extern uint8_t Eeprom32_process_state ;
|
||||
extern uint8_t *Eeprom32_source_address ;
|
||||
extern uint8_t Eeprom32_file_index ;
|
||||
extern uint32_t Eeprom32_data_size ;
|
||||
|
||||
extern void end_spi(); // TODO not public
|
||||
extern void ee32_process( void ) ;
|
||||
extern bool eeLoadGeneral( void ) ;
|
||||
extern void eeWaitFinished();
|
||||
|
||||
extern void eeDeleteModel( uint8_t id ) ;
|
||||
extern bool eeModelExists(uint8_t id) ;
|
||||
extern bool eeCopyModel(uint8_t dst, uint8_t src);
|
||||
extern void eeSwapModels(uint8_t id1, uint8_t id2);
|
||||
bool eeLoadGeneral( void ) ;
|
||||
void eeDeleteModel( uint8_t id ) ;
|
||||
bool eeCopyModel(uint8_t dst, uint8_t src);
|
||||
void eeSwapModels(uint8_t id1, uint8_t id2);
|
||||
|
||||
#define DISPLAY_PROGRESS_BAR(x)
|
||||
|
||||
struct t_file_entry
|
||||
{
|
||||
uint32_t block_no ;
|
||||
uint32_t sequence_no ;
|
||||
uint16_t size ;
|
||||
uint8_t flags ;
|
||||
} ;
|
||||
|
||||
struct t_eeprom_header
|
||||
{
|
||||
uint32_t sequence_no ; // sequence # to decide which block is most recent
|
||||
uint16_t data_size ; // # bytes in data area
|
||||
uint8_t flags ;
|
||||
uint8_t hcsum ;
|
||||
};
|
||||
|
||||
extern struct t_file_entry File_system[] ;
|
||||
|
||||
extern EEGeneral g_eeGeneral;
|
||||
extern ModelData g_model;
|
||||
|
||||
extern uint8_t Spi_tx_buf[] ;
|
||||
extern uint8_t Spi_rx_buf[] ;
|
||||
|
||||
void eeprom_write_enable();
|
||||
uint32_t eeprom_read_status();
|
||||
void read32_eeprom_data(uint32_t eeAddress, register uint8_t *buffer, uint32_t size);
|
||||
uint32_t spi_PDC_action( register uint8_t *command, register uint8_t *tx, register uint8_t *rx, register uint32_t comlen, register uint32_t count );
|
||||
|
||||
#if defined(SDCARD)
|
||||
const pm_char * eeBackupModel(uint8_t i_fileSrc);
|
||||
const pm_char * eeRestoreModel(uint8_t i_fileDst, char *model_name);
|
||||
#endif
|
||||
|
||||
void loadGeneralSettings();
|
||||
void loadModel(int index);
|
||||
uint32_t loadGeneralSettings();
|
||||
uint32_t loadModel(uint32_t index);
|
||||
|
||||
enum EepromWriteState {
|
||||
EEPROM_IDLE = 0,
|
||||
EEPROM_START_WRITE,
|
||||
EEPROM_ERASING_FILE_BLOCK1,
|
||||
EEPROM_ERASING_FILE_BLOCK1_WAIT,
|
||||
EEPROM_ERASE_FILE_BLOCK2,
|
||||
EEPROM_ERASING_FILE_BLOCK2,
|
||||
EEPROM_ERASING_FILE_BLOCK2_WAIT,
|
||||
EEPROM_WRITE_BUFFER,
|
||||
EEPROM_WRITING_BUFFER,
|
||||
EEPROM_WRITING_BUFFER_WAIT,
|
||||
EEPROM_WRITE_NEXT_BUFFER,
|
||||
EEPROM_ERASING_FAT_BLOCK,
|
||||
EEPROM_ERASING_FAT_BLOCK_WAIT,
|
||||
EEPROM_WRITE_NEW_FAT,
|
||||
EEPROM_WRITING_NEW_FAT,
|
||||
EEPROM_WRITING_NEW_FAT_WAIT,
|
||||
EEPROM_END_WRITE
|
||||
};
|
||||
|
||||
extern EepromWriteState eepromWriteState;
|
||||
void eepromWriteProcess();
|
||||
void eepromWriteWait(EepromWriteState state = EEPROM_IDLE);
|
||||
bool eepromOpen();
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
+22
-49
@@ -187,13 +187,13 @@ static void EeFsFree(blkid_t blk)
|
||||
blkid_t i = blk;
|
||||
blkid_t tmp;
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#if defined(CPUARM)
|
||||
freeBlocks++;
|
||||
#endif
|
||||
|
||||
while ((tmp=EeFsGetLink(i))) {
|
||||
i = tmp;
|
||||
#if defined(PCBTARANIS)
|
||||
#if defined(CPUARM)
|
||||
freeBlocks++;
|
||||
#endif
|
||||
}
|
||||
@@ -203,7 +203,7 @@ static void EeFsFree(blkid_t blk)
|
||||
EeFsFlushFreelist();
|
||||
}
|
||||
|
||||
int8_t EeFsck()
|
||||
void eepromCheck()
|
||||
{
|
||||
ENABLE_SYNC_WRITE(true);
|
||||
|
||||
@@ -211,11 +211,11 @@ int8_t EeFsck()
|
||||
memclear(bufp, BLOCKS);
|
||||
blkid_t blk ;
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#if defined(CPUARM)
|
||||
blkid_t blocksCount;
|
||||
#endif
|
||||
for (uint8_t i=0; i<=MAXFILES; i++) {
|
||||
#if defined(PCBTARANIS)
|
||||
#if defined(CPUARM)
|
||||
blocksCount = 0;
|
||||
#endif
|
||||
blkid_t *startP = (i==MAXFILES ? &eeFs.freeList : &eeFs.files[i].startBlk);
|
||||
@@ -236,7 +236,7 @@ int8_t EeFsck()
|
||||
blk = 0; // abort
|
||||
}
|
||||
else {
|
||||
#if defined(PCBTARANIS)
|
||||
#if defined(CPUARM)
|
||||
blocksCount++;
|
||||
#endif
|
||||
bufp[blk] = i+1;
|
||||
@@ -246,13 +246,13 @@ int8_t EeFsck()
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
#if defined(CPUARM)
|
||||
freeBlocks = blocksCount;
|
||||
#endif
|
||||
|
||||
for (blk=FIRSTBLK; blk<BLOCKS; blk++) {
|
||||
if (!bufp[blk]) { // unused block
|
||||
#if defined(PCBTARANIS)
|
||||
#if defined(CPUARM)
|
||||
freeBlocks++;
|
||||
#endif
|
||||
EeFsSetLink(blk, eeFs.freeList);
|
||||
@@ -262,11 +262,9 @@ int8_t EeFsck()
|
||||
}
|
||||
|
||||
ENABLE_SYNC_WRITE(false);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void EeFsFormat()
|
||||
void eepromFormat()
|
||||
{
|
||||
ENABLE_SYNC_WRITE(true);
|
||||
|
||||
@@ -280,7 +278,7 @@ void EeFsFormat()
|
||||
}
|
||||
EeFsSetLink(BLOCKS-1, 0);
|
||||
eeFs.freeList = FIRSTBLK;
|
||||
#if defined(PCBTARANIS)
|
||||
#if defined(CPUARM)
|
||||
freeBlocks = BLOCKS;
|
||||
#endif
|
||||
EeFsFlush();
|
||||
@@ -288,7 +286,7 @@ void EeFsFormat()
|
||||
ENABLE_SYNC_WRITE(false);
|
||||
}
|
||||
|
||||
inline bool EeFsOpen()
|
||||
bool eepromOpen()
|
||||
{
|
||||
eeprom_read_block((uint8_t *)&eeFs, 0, sizeof(eeFs));
|
||||
|
||||
@@ -301,7 +299,12 @@ inline bool EeFsOpen()
|
||||
}
|
||||
#endif
|
||||
|
||||
return eeFs.version == EEFS_VERS && eeFs.mySize == sizeof(eeFs);
|
||||
if (eeFs.version != EEFS_VERS || eeFs.mySize != sizeof(eeFs)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
eepromCheck();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool EFile::exists(uint8_t i_fileId)
|
||||
@@ -432,7 +435,7 @@ void RlcFile::nextWriteStep()
|
||||
if (!m_currBlk && m_pos==0) {
|
||||
eeFs.files[FILE_TMP].startBlk = m_currBlk = eeFs.freeList;
|
||||
if (m_currBlk) {
|
||||
#if defined(PCBTARANIS)
|
||||
#if defined(CPUARM)
|
||||
freeBlocks--;
|
||||
#endif
|
||||
eeFs.freeList = EeFsGetLink(m_currBlk);
|
||||
@@ -471,7 +474,7 @@ void RlcFile::nextWriteStep()
|
||||
switch (m_write_step & 0x0f) {
|
||||
case WRITE_NEXT_LINK_1:
|
||||
m_currBlk = eeFs.freeList;
|
||||
#if defined(PCBTARANIS)
|
||||
#if defined(CPUARM)
|
||||
freeBlocks--;
|
||||
#endif
|
||||
eeFs.freeList = EeFsGetLink(eeFs.freeList);
|
||||
@@ -550,7 +553,6 @@ bool RlcFile::copy(uint8_t i_fileDst, uint8_t i_fileSrc)
|
||||
}
|
||||
|
||||
#if defined(SDCARD)
|
||||
extern FIL g_oLogFile;
|
||||
const pm_char * eeBackupModel(uint8_t i_fileSrc)
|
||||
{
|
||||
char *buf = reusableBuffer.modelsel.mainname;
|
||||
@@ -802,12 +804,12 @@ void RlcFile::nextRlcWriteStep()
|
||||
// TODO reuse EeFsFree!!!
|
||||
blkid_t prev_freeList = eeFs.freeList;
|
||||
eeFs.freeList = fri;
|
||||
#if defined(PCBTARANIS)
|
||||
#if defined(CPUARM)
|
||||
freeBlocks++;
|
||||
#endif
|
||||
while (EeFsGetLink(fri)) {
|
||||
fri = EeFsGetLink(fri);
|
||||
#if defined(PCBTARANIS)
|
||||
#if defined(CPUARM)
|
||||
freeBlocks++;
|
||||
#endif
|
||||
}
|
||||
@@ -1025,41 +1027,12 @@ void eeErase(bool warn)
|
||||
}
|
||||
|
||||
MESSAGE(STR_EEPROMWARN, STR_EEPROMFORMATTING, NULL, AU_EEPROM_FORMATTING);
|
||||
EeFsFormat();
|
||||
eepromFormat();
|
||||
theFile.writeRlc(FILE_GENERAL, FILE_TYP_GENERAL, (uint8_t*)&g_eeGeneral, sizeof(EEGeneral), true);
|
||||
modelDefault(0);
|
||||
theFile.writeRlc(FILE_MODEL(0), FILE_TYP_MODEL, (uint8_t*)&g_model, sizeof(g_model), true);
|
||||
}
|
||||
|
||||
// TODO merge this code with eeprom_arm.cpp one
|
||||
void eeReadAll()
|
||||
{
|
||||
if (!EeFsOpen() ||
|
||||
EeFsck() < 0 ||
|
||||
!eeLoadGeneral())
|
||||
{
|
||||
eeErase(true);
|
||||
}
|
||||
else {
|
||||
eeLoadModelHeaders();
|
||||
}
|
||||
|
||||
stickMode = g_eeGeneral.stickMode;
|
||||
|
||||
#if defined(CPUARM)
|
||||
for (uint8_t i=0; languagePacks[i]!=NULL; i++) {
|
||||
if (!strncmp(g_eeGeneral.ttsLanguage, languagePacks[i]->id, 2)) {
|
||||
currentLanguagePackIdx = i;
|
||||
currentLanguagePack = languagePacks[i];
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(CPUARM)
|
||||
eeLoadModel(g_eeGeneral.currModel);
|
||||
#endif
|
||||
}
|
||||
|
||||
void eeCheck(bool immediately)
|
||||
{
|
||||
if (immediately) {
|
||||
|
||||
@@ -116,8 +116,7 @@ extern EeFs eeFs;
|
||||
#define BLOCKS_OFFSET (RESV-BS)
|
||||
#endif
|
||||
|
||||
int8_t EeFsck();
|
||||
void EeFsFormat();
|
||||
void eepromFormat();
|
||||
uint16_t EeFsGetFree();
|
||||
|
||||
#if !defined(CPUARM)
|
||||
@@ -247,6 +246,10 @@ void loadGeneralSettings();
|
||||
void loadModel(int index);
|
||||
#endif
|
||||
|
||||
bool eepromOpen();
|
||||
void eeLoadModelName(uint8_t id, char *name);
|
||||
bool eeLoadGeneral();
|
||||
|
||||
// For EEPROM backup/restore
|
||||
#if defined(CPUARM)
|
||||
inline bool isEepromStart(const void * buffer)
|
||||
|
||||
@@ -244,10 +244,10 @@ void menuModelFlightModesAll(uint8_t event)
|
||||
uint8_t att;
|
||||
for (uint8_t i=0; i<MAX_FLIGHT_MODES; i++) {
|
||||
#if defined(CPUARM)
|
||||
coord_t y = MENU_HEADER_HEIGHT + 1 + (i-s_pgOfs)*FH;
|
||||
if (y<MENU_HEADER_HEIGHT+1 || y>(LCD_LINES-1)*FH+MENU_HEADER_HEIGHT-FH) continue;
|
||||
int8_t y = 1 + (1+i-s_pgOfs)*FH;
|
||||
if (y<1*FH+1 || y>(LCD_LINES-1)*FH+1) continue;
|
||||
#else
|
||||
coord_t y = MENU_HEADER_HEIGHT + 1 + i*FH;
|
||||
uint8_t y = 1 + (i+1)*FH;
|
||||
#endif
|
||||
att = (i==sub ? INVERS : 0);
|
||||
FlightModeData *p = flightModeAddress(i);
|
||||
@@ -269,9 +269,9 @@ void menuModelFlightModesAll(uint8_t event)
|
||||
#endif
|
||||
}
|
||||
|
||||
if (p->fadeIn || p->fadeOut)
|
||||
if (p->fadeIn || p->fadeOut) {
|
||||
lcd_putc(LCD_W-FW-MENUS_SCROLLBAR_WIDTH, y, (p->fadeIn && p->fadeOut) ? '*' : (p->fadeIn ? 'I' : 'O'));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(CPUARM)
|
||||
|
||||
@@ -332,7 +332,7 @@ void menuModelSetup(uint8_t event)
|
||||
|
||||
#if defined(CPUARM)
|
||||
case ITEM_MODEL_DISPLAY_TRIMS:
|
||||
g_model.displayTrims = selectMenuItem(MODEL_SETUP_2ND_COLUMN, y, "Display Trims", "\006No\0 ChangeYes", g_model.displayTrims, 0, 2, attr, event);
|
||||
g_model.displayTrims = selectMenuItem(MODEL_SETUP_2ND_COLUMN, y, STR_DISPLAY_TRIMS, STR_VDISPLAYTRIMS, g_model.displayTrims, 0, 2, attr, event);
|
||||
break;
|
||||
#endif
|
||||
|
||||
@@ -467,7 +467,7 @@ void menuModelSetup(uint8_t event)
|
||||
|
||||
#if defined(CPUARM)
|
||||
case ITEM_MODEL_USE_GLOBAL_FUNCTIONS:
|
||||
lcd_putsLeft(y, "Use Global Funcs");
|
||||
lcd_putsLeft(y, STR_USE_GLOBAL_FUNCS);
|
||||
menu_lcd_onoff(MODEL_SETUP_2ND_COLUMN, y, !g_model.noGlobalFunctions, attr);
|
||||
if (attr) g_model.noGlobalFunctions = !checkIncDecModel(event, !g_model.noGlobalFunctions, 0, 1);
|
||||
break;
|
||||
|
||||
@@ -93,8 +93,8 @@ void displayTrims(uint8_t phase)
|
||||
static coord_t x[4] = {TRIM_LH_X, TRIM_LV_X, TRIM_RV_X, TRIM_RH_X};
|
||||
static uint8_t vert[4] = {0,1,1,0};
|
||||
coord_t xm, ym;
|
||||
xm = x[CONVERT_MODE(i)];
|
||||
|
||||
uint8_t stickIndex = CONVERT_MODE(i);
|
||||
xm = x[stickIndex];
|
||||
uint8_t att = ROUND;
|
||||
int16_t val = getTrimValue(phase, i);
|
||||
|
||||
@@ -134,6 +134,13 @@ void displayTrims(uint8_t phase)
|
||||
if (exttrim) {
|
||||
lcd_hline(xm-1, ym, 3);
|
||||
}
|
||||
#endif
|
||||
#if defined(CPUARM)
|
||||
if (g_model.displayTrims != DISPLAY_TRIMS_NEVER && dir != 0) {
|
||||
if (g_model.displayTrims == DISPLAY_TRIMS_ALWAYS || (trimsDisplayTimer > 0 && (trimsDisplayMask & (1<<i)))) {
|
||||
lcd_outdezAtt(dir>0 ? 22 : 54, xm-2, -abs(dir/5), TINSIZE|VERTICAL);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
@@ -153,6 +160,13 @@ void displayTrims(uint8_t phase)
|
||||
if (exttrim) {
|
||||
lcd_vline(xm, ym-1, 3);
|
||||
}
|
||||
#endif
|
||||
#if defined(CPUARM)
|
||||
if (g_model.displayTrims != DISPLAY_TRIMS_NEVER && dir != 0) {
|
||||
if (g_model.displayTrims == DISPLAY_TRIMS_ALWAYS || (trimsDisplayTimer > 0 && (trimsDisplayMask & (1<<i)))) {
|
||||
lcd_outdezAtt((stickIndex==0 ? TRIM_LH_X : TRIM_RH_X)+(dir>0 ? -11 : 20), ym-2, -abs(dir/5), TINSIZE);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
lcd_square(xm-3, ym-3, 7, att);
|
||||
@@ -170,7 +184,7 @@ void displayTimers()
|
||||
// Main timer
|
||||
if (g_model.timers[0].mode) {
|
||||
TimerState & timerState = timersStates[0];
|
||||
uint8_t att = DBLSIZE | (timerState.val<0 ? BLINK|INVERS : 0);
|
||||
LcdFlags att = DBLSIZE | (timerState.val<0 ? BLINK|INVERS : 0);
|
||||
putsTimer(12*FW+2+10*FWNUM-4, FH*2, timerState.val, att, att);
|
||||
uint8_t xLabel = (timerState.val >= 0 ? MAINTMR_LBL_COL : MAINTMR_LBL_COL-7);
|
||||
#if defined(CPUARM)
|
||||
|
||||
@@ -83,8 +83,8 @@ void checkEeprom()
|
||||
if (!usbPlugged()) {
|
||||
// TODO merge these 2 branches
|
||||
#if defined(PCBSKY9X)
|
||||
if (Eeprom32_process_state != E32_IDLE)
|
||||
ee32_process();
|
||||
if (eepromWriteState != EEPROM_IDLE)
|
||||
eepromWriteProcess();
|
||||
else if (TIME_TO_WRITE())
|
||||
eeCheck(false);
|
||||
#else
|
||||
|
||||
@@ -131,18 +131,18 @@
|
||||
#define NUM_XPOTS 3
|
||||
#endif
|
||||
#define TELEM_VALUES_MAX 32
|
||||
#elif defined(CPUARM)
|
||||
#elif defined(PCBSKY9X)
|
||||
#define MAX_MODELS 60
|
||||
#define NUM_CHNOUT 32 // number of real output channels CH1-CH32
|
||||
#define MAX_FLIGHT_MODES 9
|
||||
#define MAX_MIXERS 60
|
||||
#define MAX_EXPOS 32
|
||||
#define MAX_MIXERS 64
|
||||
#define MAX_EXPOS 64
|
||||
#define NUM_LOGICAL_SWITCH 32 // number of custom switches
|
||||
#define NUM_CFN 60 // number of functions assigned to switches
|
||||
#define NUM_CFN 64 // number of functions assigned to switches
|
||||
#define NUM_TRAINER 16
|
||||
#define NUM_POTS 3
|
||||
#define NUM_XPOTS 0
|
||||
#define TELEM_VALUES_MAX 16
|
||||
#define TELEM_VALUES_MAX 32
|
||||
#elif defined(CPUM2560) || defined(CPUM2561)
|
||||
#define MAX_MODELS 30
|
||||
#define NUM_CHNOUT 16 // number of real output channels CH1-CH16
|
||||
|
||||
@@ -68,6 +68,7 @@
|
||||
#define SPORT_FIRMWARE_EXT ".frk"
|
||||
|
||||
extern FATFS g_FATFS_Obj;
|
||||
extern FIL g_oLogFile;
|
||||
|
||||
extern uint8_t logDelay;
|
||||
const pm_char *openLogs();
|
||||
|
||||
@@ -275,6 +275,7 @@ uint32_t pwrCheck();
|
||||
|
||||
// EEPROM driver
|
||||
void eepromInit();
|
||||
uint32_t eepromReadStatus();
|
||||
|
||||
// Rotary Encoder driver
|
||||
void rotencInit();
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
|
||||
#include "../../opentx.h"
|
||||
|
||||
extern volatile uint32_t Spi_complete; // TODO in the driver ?
|
||||
volatile uint32_t Spi_complete;
|
||||
uint8_t Spi_tx_buf[24] ;
|
||||
uint8_t Spi_rx_buf[24] ;
|
||||
|
||||
uint32_t spi_PDC_action( register uint8_t *command, register uint8_t *tx, register uint8_t *rx, register uint32_t comlen, register uint32_t count )
|
||||
{
|
||||
@@ -186,9 +188,13 @@ void eeprom_write_enable()
|
||||
eeprom_write_one(6, 0);
|
||||
}
|
||||
|
||||
uint32_t eeprom_read_status()
|
||||
uint32_t eepromReadStatus()
|
||||
{
|
||||
#if defined(SIMU)
|
||||
return 0;
|
||||
#else
|
||||
return eeprom_write_one(5, 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
// SPI i/f to EEPROM (4Mb)
|
||||
|
||||
@@ -44,7 +44,7 @@ TEST(EEPROM, 100_random_writes)
|
||||
uint8_t buf[1000];
|
||||
uint8_t buf2[1000];
|
||||
|
||||
EeFsFormat();
|
||||
eepromFormat();
|
||||
|
||||
for(int i=0; i<100; i++) {
|
||||
int size = rand()%800;
|
||||
@@ -66,7 +66,7 @@ TEST(EEPROM, test2)
|
||||
RlcFile f;
|
||||
uint8_t buf[1000];
|
||||
|
||||
EeFsFormat();
|
||||
eepromFormat();
|
||||
|
||||
for(int i=0; i<1000; i++) buf[i]='6'+i%4;
|
||||
|
||||
@@ -89,7 +89,7 @@ TEST(EEPROM, eeCheckImmediately)
|
||||
// RlcFile f;
|
||||
uint8_t buf[1000];
|
||||
|
||||
EeFsFormat();
|
||||
eepromFormat();
|
||||
|
||||
for(int i=0; i<1000; i++) buf[i]='6'+i%4;
|
||||
|
||||
@@ -114,7 +114,7 @@ TEST(EEPROM, copy)
|
||||
|
||||
uint8_t buf[1000];
|
||||
|
||||
EeFsFormat();
|
||||
eepromFormat();
|
||||
|
||||
for(int i=0; i<1000; i++) buf[i]='6'+i%4;
|
||||
|
||||
@@ -139,7 +139,7 @@ TEST(EEPROM, rm)
|
||||
|
||||
uint8_t buf[1000];
|
||||
|
||||
EeFsFormat();
|
||||
eepromFormat();
|
||||
|
||||
for(int i=0; i<1000; i++) buf[i]='6'+i%4;
|
||||
|
||||
|
||||
@@ -591,11 +591,11 @@
|
||||
#define TR_ELIMITS TR("E.Limits", "Extended Limits")
|
||||
#define TR_ETRIMS TR("E.Trims", "Extended Trims")
|
||||
#define TR_TRIMINC "Trim Step"
|
||||
#define TR_DISPLAY_TRIMS "Display Trims"
|
||||
#define TR_DISPLAY_TRIMS TR("Show Trims", "Display Trims")
|
||||
#define TR_TTRACE TR("T-Source", INDENT "Source")
|
||||
#define TR_TTRIM TR("T-Trim", INDENT "Trim Idle Only")
|
||||
#define TR_BEEPCTR TR("Ctr Beep", "Center Beep")
|
||||
#define TR_USE_GLOBAL_FUNCS "Use Global Funcs"
|
||||
#define TR_USE_GLOBAL_FUNCS TR("Glob.Funcs", "Use Global Funcs")
|
||||
#define TR_PROTO TR(INDENT "Proto", INDENT "Protocol")
|
||||
#if defined(CPUARM)
|
||||
#define TR_PPMFRAME INDENT "PPM frame"
|
||||
|
||||
Reference in New Issue
Block a user