diff --git a/companion/src/firmwares/opentx/opentxTaranisSimulator.cpp b/companion/src/firmwares/opentx/opentxTaranisSimulator.cpp index 63b369d15..25f2abf43 100644 --- a/companion/src/firmwares/opentx/opentxTaranisSimulator.cpp +++ b/companion/src/firmwares/opentx/opentxTaranisSimulator.cpp @@ -73,7 +73,6 @@ inline int geteepromsize() { #include "radio/src/protocols/ppm_arm.cpp" #include "radio/src/protocols/pxx_arm.cpp" #include "radio/src/protocols/dsm2_arm.cpp" -#include "radio/src/targets/taranis/pwr_driver.c" #include "radio/src/eeprom_common.cpp" #include "radio/src/eeprom_conversions.cpp" #include "radio/src/eeprom_rlc.cpp" diff --git a/radio/src/loadboot.cpp b/radio/src/loadboot.cpp index 867103916..0d27705ff 100644 --- a/radio/src/loadboot.cpp +++ b/radio/src/loadboot.cpp @@ -45,15 +45,15 @@ * ****************************************************************************/ +#if !defined(SIMU) + #include -#ifdef PCBSKY -#include "AT91SAM3S4.h" -#endif - -#ifdef PCBTARANIS -#include "stm32f2xx.h" -#include "stm32f2xx_gpio.h" +#if defined(PCBSKY9X) + #include "AT91SAM3S4.h" +#elif defined(PCBTARANIS) + #include "stm32f2xx.h" + #include "stm32f2xx_gpio.h" #endif #if defined(PCBTARANIS) @@ -61,9 +61,6 @@ void bwdt_reset() { IWDG->KR = 0xAAAA; // reload } -#endif - -#if defined(PCBTARANIS) __attribute__ ((section(".bootrodata"), used)) void _bootStart(void); @@ -71,13 +68,10 @@ void _bootStart(void); __attribute__ ((section(".isr_boot_vector"), used)) const uint32_t BootVectors[] = { (uint32_t) &_estack, (uint32_t) (void (*)(void)) ((unsigned long) &_bootStart) }; -#endif -#if defined(PCBTARANIS) __attribute__ ((section(".bootrodata.*"), used)) -#endif -#ifdef PCBSKY +#elif defined(PCBSKY9X) __attribute__ ((section(".bootrodata"), used)) #endif @@ -154,3 +148,4 @@ void _bootStart() } #endif +#endif diff --git a/radio/src/simpgmspace.cpp b/radio/src/simpgmspace.cpp index 8b941be1f..33d16b028 100644 --- a/radio/src/simpgmspace.cpp +++ b/radio/src/simpgmspace.cpp @@ -637,6 +637,9 @@ void lcdRefresh() } #if defined(PCBTARANIS) +void pwrInit() { } +uint32_t pwrCheck() { return true; } +void pwrOff() { } void usbStart() { } int usbPlugged() { return false; } void USART_DeInit(USART_TypeDef* ) { } @@ -668,3 +671,4 @@ void RCC_LSEConfig(uint8_t RCC_LSE) { } FlagStatus RCC_GetFlagStatus(uint8_t RCC_FLAG) { return RESET; } ErrorStatus RTC_WaitForSynchro(void) { return SUCCESS; } #endif + diff --git a/radio/src/targets/taranis/board_taranis.h b/radio/src/targets/taranis/board_taranis.h index 6a1a1e783..1f9d38d83 100644 --- a/radio/src/targets/taranis/board_taranis.h +++ b/radio/src/targets/taranis/board_taranis.h @@ -37,6 +37,8 @@ #ifndef board_taranis_h #define board_taranis_h +#include "stddef.h" + #ifdef __cplusplus extern "C" { #endif