Initial TX16S (#7344)
* TX16S initial push - Radio booting, navigation keys ok * TX16S libsimu * Please Travis * Do not start radio on charger power * USB charger led handling * Revert "USB charger led handling" until we have proper details * Pseudo sport power pin * Please Travis * tx16s serial debug * Add tx16s calibration picture * Review anadir for tx16s, needs to be checked on more radios * Dump raw multi telem on AUX port * More work on TX16S * Fixes * Compilation fix * Compilation fix * Fix Aux Serial power * Various improvement * USB charger led handling * Cosmetics * Cosmetics * USB charger led handling * Add charge indicator on GUI
This commit is contained in:
@@ -205,11 +205,26 @@ int main()
|
||||
AUX_SERIAL_RCC_APB1Periph |
|
||||
SD_RCC_APB1Periph, ENABLE);
|
||||
|
||||
RCC_APB2PeriphClockCmd(LCD_RCC_APB2Periph | BACKLIGHT_RCC_APB2Periph | RCC_APB2Periph_SYSCFG, ENABLE);
|
||||
RCC_APB2PeriphClockCmd(LCD_RCC_APB2Periph | BACKLIGHT_RCC_APB2Periph | RCC_APB2Periph_SYSCFG | AUX_SERIAL_RCC_APB2Periph, ENABLE);
|
||||
|
||||
pwrInit();
|
||||
keysInit();
|
||||
|
||||
// USB charger handling
|
||||
#if defined(USB_CHARGER)
|
||||
if (!WAS_RESET_BY_WATCHDOG_OR_SOFTWARE() && !pwrPressed()) {
|
||||
ledInit();
|
||||
usbChargerInit();
|
||||
ledOff();
|
||||
while (!pwrPressed()) {
|
||||
if(usbChargerLed())
|
||||
GPIO_SetBits(LED_GPIO, LED_GREEN_GPIO_PIN);
|
||||
else
|
||||
ledOff();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// wait a bit for the inputs to stabilize...
|
||||
if (!WAS_RESET_BY_WATCHDOG_OR_SOFTWARE()) {
|
||||
for (uint32_t i = 0; i < 150000; i++) {
|
||||
|
||||
Reference in New Issue
Block a user