No more REV9E and REVPLUS

This commit is contained in:
Bertrand Songis
2016-07-29 14:44:59 +02:00
parent 0f740358f2
commit 51223a5864
60 changed files with 248 additions and 249 deletions
+10 -10
View File
@@ -98,7 +98,7 @@ void interrupt5ms()
per10ms();
}
#if defined(REV9E)
#if defined(PCBX9E)
checkRotaryEncoder();
#endif
}
@@ -112,16 +112,16 @@ extern "C" void INTERRUPT_5MS_IRQHandler()
}
#endif
#if defined(REV9E)
#if defined(PCBX9E)
#define PWR_PRESS_DURATION_MIN 200 // 2s
#define PWR_PRESS_DURATION_MAX 500 // 5s
const pm_uchar bmp_startup[] PROGMEM = {
#include "../../bitmaps/212x64/startup.lbm"
#include "startup.lbm"
};
const pm_uchar bmp_lock[] PROGMEM = {
#include "../../bitmaps/212x64/lock.lbm"
#include "lock.lbm"
};
#endif
@@ -132,8 +132,8 @@ void boardInit()
RCC_APB1PeriphClockCmd(LCD_RCC_APB1Periph | AUDIO_RCC_APB1Periph | BACKLIGHT_RCC_APB1Periph | INTERRUPT_5MS_APB1Periph | TIMER_2MHz_APB1Periph | I2C_RCC_APB1Periph | SD_RCC_APB1Periph | TRAINER_RCC_APB1Periph | TELEMETRY_RCC_APB1Periph | SERIAL_RCC_APB1Periph, ENABLE);
RCC_APB2PeriphClockCmd(BACKLIGHT_RCC_APB2Periph | ADC_RCC_APB2Periph | HAPTIC_RCC_APB2Periph | INTMODULE_RCC_APB2Periph | EXTMODULE_RCC_APB2Periph | HEARTBEAT_RCC_APB2Periph, ENABLE);
#if !defined(REV9E)
// some REV9E boards need that the pwrInit() is moved a little bit later
#if !defined(PCBX9E)
// some X9E boards need that the pwrInit() is moved a little bit later
pwrInit();
#endif
@@ -152,7 +152,7 @@ void boardInit()
hapticInit();
#endif
#if defined(REV9E)
#if defined(PCBX9E)
bluetoothInit(BLUETOOTH_DEFAULT_BAUDRATE);
#endif
@@ -160,7 +160,7 @@ void boardInit()
DBGMCU_APB1PeriphConfig(DBGMCU_IWDG_STOP|DBGMCU_TIM1_STOP|DBGMCU_TIM2_STOP|DBGMCU_TIM3_STOP|DBGMCU_TIM6_STOP|DBGMCU_TIM8_STOP|DBGMCU_TIM10_STOP|DBGMCU_TIM13_STOP|DBGMCU_TIM14_STOP, ENABLE);
#endif
#if defined(REV9E)
#if defined(PCBX9E)
if (!WAS_RESET_BY_WATCHDOG_OR_SOFTWARE()) {
lcdClear();
lcdDrawBitmap(76, 2, bmp_lock, 0, 60);
@@ -210,11 +210,11 @@ void boardInit()
void boardOff()
{
BACKLIGHT_OFF();
#if defined(REV9E)
#if defined(PCBX9E)
toplcdOff();
#endif
#if defined(REV9E)
#if defined(PCBX9E)
while (pwrPressed()) {
wdt_reset();
}