[Taranis] EEPROM disconnected when Massstorage is active

This commit is contained in:
bsongis@gmail.com
2013-04-01 20:49:48 +00:00
parent 1a7bb8e966
commit 5126de7ed8
8 changed files with 26 additions and 8 deletions
+4
View File
@@ -961,6 +961,10 @@ void eeReadAll()
void eeCheck(bool immediately)
{
if (EEPROM_MASSSTORAGE()) {
return;
}
if (immediately) {
eeFlush();
}
+2
View File
@@ -180,4 +180,6 @@ void sdPoll10ms();
uint8_t pwrCheck();
#define UNEXPECTED_SHUTDOWN() ((mcusr & (1 << WDRF)) || g_eeGeneral.unexpectedShutdown)
#define EEPROM_MASSSTORAGE() (0)
#endif
+3 -1
View File
@@ -47,4 +47,6 @@ void sdPoll10ms();
uint8_t pwrCheck();
#define UNEXPECTED_SHUTDOWN() ((mcusr & (1 << WDRF)) || g_eeGeneral.unexpectedShutdown)
#endif
#define EEPROM_MASSSTORAGE() (0)
#endif
+9 -2
View File
@@ -3453,8 +3453,15 @@ void perMain()
lcd_clear();
const char *warn = s_warning;
g_menuStack[g_menuStackPtr](warn ? 0 : evt);
if (warn) displayWarning(evt);
if (EEPROM_MASSSTORAGE()) {
menuMainView(0);
}
else {
g_menuStack[g_menuStackPtr](warn ? 0 : evt);
if (warn) displayWarning(evt);
}
drawStatusLine();
lcdRefresh();
+1
View File
@@ -235,6 +235,7 @@ uint32_t pwrCheck();
// EEPROM driver
void eepromInit();
#define EEPROM_MASSSTORAGE() (0)
// Rotary Encoder driver
void rotencInit();
+2
View File
@@ -215,4 +215,6 @@ extern uint8_t RotEncoder ;
void rotencPoll();
#endif
#define EEPROM_MASSSTORAGE() (0)
#endif
+5 -3
View File
@@ -166,6 +166,10 @@ void pwrOff();
#define __BACKLIGHT_OFF GPIO_ResetBits(GPIOB, GPIO_Pin_BL)
#define IS_BACKLIGHT_ON() GPIO_ReadInputDataBit(GPIOB, GPIO_Pin_BL)
// USB driver
void usbInit(void);
extern uint8_t usb_connected;
// EEPROM driver
#if !defined(SIMU)
#define eepromInit() I2C_EE_Init()
@@ -175,8 +179,6 @@ void pwrOff();
#define eepromInit()
void eeWriteBlockCmp(const void *pointer_ram, uint16_t pointer_eeprom, size_t size);
#endif
// USB driver
void usbInit(void);
#define EEPROM_MASSSTORAGE() (usb_connected)
#endif
-2
View File
@@ -28,8 +28,6 @@
/* Includes ------------------------------------------------------------------*/
#include "../opentx.h"
extern uint8_t usb_connected;
extern "C" {
#include "usbd_usr.h"