mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 17:25:13 +03:00
[Horus] #3599 - Another emergency message when there is no SD
This commit is contained in:
parent
de52ee513c
commit
d51e86b669
2 changed files with 18 additions and 11 deletions
|
@ -424,6 +424,15 @@ void perMain()
|
|||
}
|
||||
#endif
|
||||
|
||||
#if !defined(EEPROM)
|
||||
if (!SD_CARD_PRESENT()) {
|
||||
lcd->clear();
|
||||
lcdDrawText(LCD_W/2, LCD_H/2-20, STR_NO_SDCARD, DBLSIZE|CENTERED|TEXT_BGCOLOR);
|
||||
lcdRefresh();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(USB_MASS_STORAGE)
|
||||
if (usbPlugged()) {
|
||||
// disable access to menus
|
||||
|
|
|
@ -129,21 +129,18 @@ void getCPUUniqueID(char * s);
|
|||
#define SD_IS_HC() (sdIsHC())
|
||||
#define SD_GET_SPEED() (sdGetSpeed())
|
||||
#define SD_GET_FREE_BLOCKNR() (sdGetFreeSectors())
|
||||
#else
|
||||
#define SD_IS_HC() (0)
|
||||
#define SD_GET_SPEED() (0)
|
||||
#endif
|
||||
|
||||
#if defined(SIMU) && !defined(SIMU_DISKIO)
|
||||
#define sdInit()
|
||||
#define sdDone()
|
||||
#else
|
||||
#define SD_CARD_PRESENT() (~SD_PRESENT_GPIO->IDR & SD_PRESENT_GPIO_PIN)
|
||||
void sdInit(void);
|
||||
void sdDone(void);
|
||||
#define sdPoll10ms()
|
||||
#define sdMountPoll()
|
||||
uint32_t sdMounted(void);
|
||||
#define SD_CARD_PRESENT() (~SD_PRESENT_GPIO->IDR & SD_PRESENT_GPIO_PIN)
|
||||
#else
|
||||
#define SD_IS_HC() (0)
|
||||
#define SD_GET_SPEED() (0)
|
||||
#define sdInit()
|
||||
#define sdDone()
|
||||
#define SD_CARD_PRESENT() true
|
||||
#endif
|
||||
|
||||
// Flash Write driver
|
||||
|
@ -259,6 +256,7 @@ void pwrOff(void);
|
|||
void pwrResetHandler(void);
|
||||
uint32_t pwrPressed(void);
|
||||
uint32_t pwrPressedDuration(void);
|
||||
#define pwroffPressed() pwrPressed()
|
||||
#define UNEXPECTED_SHUTDOWN() (WAS_RESET_BY_WATCHDOG())
|
||||
|
||||
// Led driver
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue