mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 17:25:13 +03:00
[Taranis] EEPROM async write was disabled
This commit is contained in:
parent
508e3e899c
commit
3cb64d984a
4 changed files with 10 additions and 15 deletions
|
@ -84,7 +84,7 @@ void checkEeprom()
|
||||||
eepromWriteProcess();
|
eepromWriteProcess();
|
||||||
else if (TIME_TO_WRITE())
|
else if (TIME_TO_WRITE())
|
||||||
storageCheck(false);
|
storageCheck(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void checkEeprom()
|
void checkEeprom()
|
||||||
|
@ -399,7 +399,10 @@ void perMain()
|
||||||
DEBUG_TIMER_STOP(debugTimerPerMain1);
|
DEBUG_TIMER_STOP(debugTimerPerMain1);
|
||||||
|
|
||||||
event_t evt = getEvent(false);
|
event_t evt = getEvent(false);
|
||||||
if (evt && (g_eeGeneral.backlightMode & e_backlight_mode_keys)) backlightOn(); // on keypress turn the light on
|
if (evt && (g_eeGeneral.backlightMode & e_backlight_mode_keys)) {
|
||||||
|
// on keypress turn the light on
|
||||||
|
backlightOn();
|
||||||
|
}
|
||||||
doLoopCommonActions();
|
doLoopCommonActions();
|
||||||
#if defined(NAVIGATION_STICKS)
|
#if defined(NAVIGATION_STICKS)
|
||||||
uint8_t sticks_evt = getSticksNavigationEvent();
|
uint8_t sticks_evt = getSticksNavigationEvent();
|
||||||
|
|
|
@ -29,10 +29,10 @@ EeFs eeFs;
|
||||||
|
|
||||||
#if defined(CPUARM)
|
#if defined(CPUARM)
|
||||||
blkid_t freeBlocks = 0;
|
blkid_t freeBlocks = 0;
|
||||||
#else
|
|
||||||
uint8_t s_sync_write = false;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
uint8_t s_sync_write = false;
|
||||||
|
|
||||||
static uint8_t EeFsRead(blkid_t blk, uint8_t ofs)
|
static uint8_t EeFsRead(blkid_t blk, uint8_t ofs)
|
||||||
{
|
{
|
||||||
uint8_t byte;
|
uint8_t byte;
|
||||||
|
|
|
@ -117,19 +117,12 @@ class EFile
|
||||||
|
|
||||||
#define ERR_NONE 0
|
#define ERR_NONE 0
|
||||||
#define ERR_FULL 1
|
#define ERR_FULL 1
|
||||||
extern uint8_t s_write_err; // error reasons
|
extern uint8_t s_write_err; // error reasons
|
||||||
|
inline uint8_t write_errno() { return s_write_err; }
|
||||||
|
|
||||||
#if defined(CPUARM)
|
extern uint8_t s_sync_write;
|
||||||
#define ENABLE_SYNC_WRITE(val)
|
|
||||||
#define IS_SYNC_WRITE_ENABLE() true
|
|
||||||
#else
|
|
||||||
#define ENABLE_SYNC_WRITE(val) s_sync_write = val;
|
#define ENABLE_SYNC_WRITE(val) s_sync_write = val;
|
||||||
#define IS_SYNC_WRITE_ENABLE() s_sync_write
|
#define IS_SYNC_WRITE_ENABLE() s_sync_write
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
///deliver current errno, this is reset in open
|
|
||||||
inline uint8_t write_errno() { return s_write_err; }
|
|
||||||
|
|
||||||
class RlcFile: public EFile
|
class RlcFile: public EFile
|
||||||
{
|
{
|
||||||
|
|
|
@ -74,7 +74,6 @@ uint8_t eepromIsTransferComplete()
|
||||||
return eeprom_buffer_size == 0;
|
return eeprom_buffer_size == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern uint8_t s_sync_write;
|
|
||||||
void eepromWriteBlock(uint8_t * buffer, size_t address, size_t size)
|
void eepromWriteBlock(uint8_t * buffer, size_t address, size_t size)
|
||||||
{
|
{
|
||||||
eepromStartWrite(buffer, address, size);
|
eepromStartWrite(buffer, address, size);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue