PCBX9D replaced everywhere by PCBTARANIS

This commit is contained in:
bsongis
2014-03-04 09:26:52 +01:00
parent 7435416422
commit 92436f47f7
14 changed files with 56 additions and 99 deletions
-22
View File
@@ -125,28 +125,6 @@ const uint8_t chout_ar[] = { //First number is 0..23 -> template setup, Second
#define BC_BIT_REA (0x80) #define BC_BIT_REA (0x80)
#define BC_BIT_REB (0x100) #define BC_BIT_REB (0x100)
// TODO remove this enum!
enum EnumKeys {
KEY_MENU,
KEY_EXIT,
#if defined(PCBACT)
KEY_CLR,
KEY_PAGE,
KEY_PLUS, /* Fake, used for rotary encoder */
KEY_MINUS, /* Fake, used for rotary encoder */
#elif defined(PCBX9D)
KEY_ENTER,
KEY_PAGE,
KEY_PLUS,
KEY_MINUS,
#else
KEY_DOWN,
KEY_UP,
KEY_RIGHT,
KEY_LEFT,
#endif
};
#define CHAR_FOR_NAMES " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-." #define CHAR_FOR_NAMES " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-."
#define CHAR_FOR_NAMES_REGEX "[ A-Za-z0-9_.-,]*" #define CHAR_FOR_NAMES_REGEX "[ A-Za-z0-9_.-,]*"
-13
View File
@@ -91,32 +91,19 @@ ifeq ($(RUN_FROM_FLASH), 1)
CPPDEFS += -DPCBSKY CPPDEFS += -DPCBSKY
UDEFS = -Dat91sam3s8 UDEFS = -Dat91sam3s8
else else
ifeq ($(PCB), X9D)
ARCH = ARM
LDSCRIPT = stm32_ramBoot.ld
TRGT = arm-none-eabi-
CPPDEFS += -DHSE_VALUE=12000000
CPPDEFS += -DPCBX9D
FULL_PRJ = $(PROJECT)_ramBoot
EXTRAINCDIRS += include
# EXTRAINCDIRS += ../x9d
else
ifeq ($(PCB), TARANIS) ifeq ($(PCB), TARANIS)
ARCH = ARM ARCH = ARM
LDSCRIPT = stm32_ramBoot.ld LDSCRIPT = stm32_ramBoot.ld
TRGT = arm-none-eabi- TRGT = arm-none-eabi-
CPPDEFS += -DHSE_VALUE=12000000 CPPDEFS += -DHSE_VALUE=12000000
CPPDEFS += -DPCBX9D
CPPDEFS += -DPCBTARANIS CPPDEFS += -DPCBTARANIS
FULL_PRJ = $(PROJECT)_ramBoot FULL_PRJ = $(PROJECT)_ramBoot
EXTRAINCDIRS += include EXTRAINCDIRS += include
# EXTRAINCDIRS += ../targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Include # EXTRAINCDIRS += ../targets/taranis/STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Include
endif endif
endif
endif endif
# List all user C define here, like -D_DEBUG=1 # List all user C define here, like -D_DEBUG=1
# Define ASM defines here # Define ASM defines here
+22 -22
View File
@@ -58,7 +58,7 @@
#include "core_cm3.h" #include "core_cm3.h"
#endif #endif
#ifdef PCBX9D #ifdef PCBTARANIS
#include "stm32f2xx.h" #include "stm32f2xx.h"
#include "stm32f2xx_flash.h" #include "stm32f2xx_flash.h"
#include "i2c_ee.h" #include "i2c_ee.h"
@@ -96,7 +96,7 @@ extern void usbMassStorage( void ) ;
#define DISPLAY_CHAR_WIDTH 21 #define DISPLAY_CHAR_WIDTH 21
#endif #endif
#ifdef PCBX9D #ifdef PCBTARANIS
#define BOOT_KEY_UP KEY_PLUS #define BOOT_KEY_UP KEY_PLUS
#define BOOT_KEY_DOWN KEY_MINUS #define BOOT_KEY_DOWN KEY_MINUS
#define BOOT_KEY_LEFT KEY_MENU #define BOOT_KEY_LEFT KEY_MENU
@@ -208,12 +208,12 @@ static bool usbPlugged(void)
return PIOC->PIO_PDSR & 0x02000000 ; return PIOC->PIO_PDSR & 0x02000000 ;
#endif #endif
#ifdef PCBX9D #ifdef PCBTARANIS
return GPIOA->IDR & 0x0200 ; return GPIOA->IDR & 0x0200 ;
#endif #endif
} }
#ifdef PCBX9D #ifdef PCBTARANIS
extern "C" { extern "C" {
USB_OTG_CORE_HANDLE USB_OTG_dev; USB_OTG_CORE_HANDLE USB_OTG_dev;
@@ -399,7 +399,7 @@ extern "C" void TC2_IRQHandler()
} }
#endif #endif
#ifdef PCBX9D #ifdef PCBTARANIS
void init10msTimer() void init10msTimer()
{ {
// Timer14 // Timer14
@@ -686,7 +686,7 @@ uint8_t flashFile( uint32_t index )
if ( Valid == 2 ) if ( Valid == 2 )
{ {
lcd_puts_Pleft( 3*FH,"NOT A VALID FIRMWARE") ; lcd_puts_Pleft( 3*FH,"NOT A VALID FIRMWARE") ;
#ifdef PCBX9D #ifdef PCBTARANIS
lcd_puts_Pleft( 6*FH,"\015[EXIT]") ; lcd_puts_Pleft( 6*FH,"\015[EXIT]") ;
#else #else
lcd_puts_Pleft( 6*FH,"\007[EXIT]") ; lcd_puts_Pleft( 6*FH,"\007[EXIT]") ;
@@ -700,7 +700,7 @@ uint8_t flashFile( uint32_t index )
} }
lcd_putsn_P( 0, 2*FH, Filenames[index], DISPLAY_CHAR_WIDTH ) ; lcd_putsn_P( 0, 2*FH, Filenames[index], DISPLAY_CHAR_WIDTH ) ;
#ifdef PCBX9D #ifdef PCBTARANIS
lcd_puts_Pleft( 6*FH,"\010[ENTER]\021[EXIT]") ; lcd_puts_Pleft( 6*FH,"\010[ENTER]\021[EXIT]") ;
lcd_puts_Pleft( 5*FH,"\010YES\021NO") ; lcd_puts_Pleft( 5*FH,"\010YES\021NO") ;
#else #else
@@ -736,7 +736,7 @@ int main()
{ {
uint32_t i ; uint32_t i ;
uint8_t index = 0 ; uint8_t index = 0 ;
#ifdef PCBX9D #ifdef PCBTARANIS
uint8_t TenCount = 2 ; uint8_t TenCount = 2 ;
#endif #endif
uint8_t maxhsize = DISPLAY_CHAR_WIDTH ; uint8_t maxhsize = DISPLAY_CHAR_WIDTH ;
@@ -745,7 +745,7 @@ int main()
uint32_t nameCount = 0 ; uint32_t nameCount = 0 ;
uint32_t vpos = 0 ; uint32_t vpos = 0 ;
uint32_t hpos = 0 ; uint32_t hpos = 0 ;
#ifdef PCBX9D #ifdef PCBTARANIS
uint32_t firmwareAddress = 0x08000000 ; uint32_t firmwareAddress = 0x08000000 ;
#endif #endif
#ifdef PCBSKY #ifdef PCBSKY
@@ -753,7 +753,7 @@ int main()
#endif #endif
uint32_t firmwareWritten = 0 ; uint32_t firmwareWritten = 0 ;
#ifdef PCBX9D #ifdef PCBTARANIS
wdt_reset() ; wdt_reset() ;
RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN ; // Enable portA clock RCC->AHB1ENR |= RCC_AHB1ENR_GPIOAEN ; // Enable portA clock
#endif #endif
@@ -776,7 +776,7 @@ extern uint8_t OptrexDisplay ;
OptrexDisplay = 1 ; OptrexDisplay = 1 ;
#endif #endif
lcd_clear() ; lcd_clear() ;
#ifdef PCBX9D #ifdef PCBTARANIS
lcd_puts_Pleft( 0, "\006Boot Loader" ) ; lcd_puts_Pleft( 0, "\006Boot Loader" ) ;
#endif #endif
refreshDisplay() ; refreshDisplay() ;
@@ -785,7 +785,7 @@ extern uint8_t OptrexDisplay ;
refreshDisplay() ; refreshDisplay() ;
#endif #endif
#ifdef PCBX9D #ifdef PCBTARANIS
init_keys() ; init_keys() ;
I2C_EE_Init() ; I2C_EE_Init() ;
init_hw_timer() ; init_hw_timer() ;
@@ -805,7 +805,7 @@ extern uint8_t OptrexDisplay ;
FlashSize = ( (chip_id >> 8 ) & 0x000F ) == 9 ? 256 : 512 ; FlashSize = ( (chip_id >> 8 ) & 0x000F ) == 9 ? 256 : 512 ;
#endif #endif
#ifdef PCBX9D #ifdef PCBTARANIS
FlashSize = 512 ; FlashSize = 512 ;
#endif #endif
@@ -817,7 +817,7 @@ extern uint8_t OptrexDisplay ;
} }
#endif #endif
#ifdef PCBX9D #ifdef PCBTARANIS
// SD card detect pin // SD card detect pin
configure_pins( GPIO_Pin_CP, PIN_PORTD | PIN_INPUT | PIN_PULLUP ) ; configure_pins( GPIO_Pin_CP, PIN_PORTD | PIN_INPUT | PIN_PULLUP ) ;
disk_initialize( 0 ) ; disk_initialize( 0 ) ;
@@ -855,7 +855,7 @@ extern uint8_t OptrexDisplay ;
#ifdef PCBSKY #ifdef PCBSKY
lcd_puts_Pleft( 0, "Boot Loader" ) ; lcd_puts_Pleft( 0, "Boot Loader" ) ;
#endif #endif
#ifdef PCBX9D #ifdef PCBTARANIS
lcd_puts_Pleft( 0, "\006Boot Loader" ) ; lcd_puts_Pleft( 0, "\006Boot Loader" ) ;
#endif #endif
@@ -864,7 +864,7 @@ extern uint8_t OptrexDisplay ;
#ifdef PCBSKY #ifdef PCBSKY
lcd_puts_Pleft( 0, "\014Ready" ) ; lcd_puts_Pleft( 0, "\014Ready" ) ;
#endif #endif
#ifdef PCBX9D #ifdef PCBTARANIS
lcd_puts_Pleft( 0, "\022Ready" ) ; lcd_puts_Pleft( 0, "\022Ready" ) ;
#endif #endif
@@ -878,7 +878,7 @@ extern uint8_t OptrexDisplay ;
#ifdef PCBSKY #ifdef PCBSKY
lcd_puts_Pleft( 3*FH, "\010BUSY" ) ; lcd_puts_Pleft( 3*FH, "\010BUSY" ) ;
#endif #endif
#ifdef PCBX9D #ifdef PCBTARANIS
lcd_puts_Pleft( 3*FH, "\016BUSY" ) ; lcd_puts_Pleft( 3*FH, "\016BUSY" ) ;
#endif #endif
if ( usbPlugged() == 0 ) if ( usbPlugged() == 0 )
@@ -923,7 +923,7 @@ extern uint8_t OptrexDisplay ;
#ifdef PCBSKY #ifdef PCBSKY
lcd_puts_Pleft( 16, "\005No Firmware" ) ; lcd_puts_Pleft( 16, "\005No Firmware" ) ;
#endif #endif
#ifdef PCBX9D #ifdef PCBTARANIS
lcd_puts_Pleft( 16, "\013No Firmware" ) ; lcd_puts_Pleft( 16, "\013No Firmware" ) ;
#endif #endif
} }
@@ -1045,7 +1045,7 @@ extern uint8_t OptrexDisplay ;
#ifdef PCBSKY #ifdef PCBSKY
firmwareAddress = 0x00408000 ; firmwareAddress = 0x00408000 ;
#endif #endif
#ifdef PCBX9D #ifdef PCBTARANIS
firmwareAddress = 0x08008000 ; firmwareAddress = 0x08008000 ;
#endif #endif
firmwareWritten = 0 ; firmwareWritten = 0 ;
@@ -1106,13 +1106,13 @@ extern uint8_t OptrexDisplay ;
} }
} }
#ifdef PCBX9D #ifdef PCBTARANIS
if ( --TenCount == 0 ) if ( --TenCount == 0 )
{ {
TenCount = 2 ; TenCount = 2 ;
#endif #endif
refreshDisplay() ; refreshDisplay() ;
#ifdef PCBX9D #ifdef PCBTARANIS
} }
#endif #endif
if ( PowerUpDelay < 20 ) // 200 mS if ( PowerUpDelay < 20 ) // 200 mS
@@ -1124,7 +1124,7 @@ extern uint8_t OptrexDisplay ;
#ifdef PCBSKY #ifdef PCBSKY
sd_poll_10mS() ; sd_poll_10mS() ;
#endif #endif
#ifdef PCBX9D #ifdef PCBTARANIS
sdPoll10ms() ; sdPoll10ms() ;
#endif #endif
} }
+1 -1
View File
@@ -27,7 +27,7 @@
#endif #endif
#ifdef PCBX9D #ifdef PCBTARANIS
#include "radio.h" #include "radio.h"
#include "hal.h" #include "hal.h"
#include "stm32f2xx.h" #include "stm32f2xx.h"
+3 -6
View File
@@ -41,7 +41,8 @@
#ifdef PCBSKY #ifdef PCBSKY
#include "board.h" #include "board.h"
#endif #endif
#ifdef PCBX9D
#ifdef PCBTARANIS
#include "stm32f2xx.h" #include "stm32f2xx.h"
#endif #endif
@@ -133,10 +134,6 @@ void disk_timerproc (void);
volatile extern BYTE Timer1, Timer2; /* 100Hz decrement timer */ volatile extern BYTE Timer1, Timer2; /* 100Hz decrement timer */
#endif #endif
//#ifdef PCBX9D
//volatile extern DWORD Timer1, Timer2; /* 100Hz decrement timer */
//#endif
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
/// Detect if SD card is connected /// Detect if SD card is connected
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
@@ -164,7 +161,7 @@ extern uint32_t sd_acmd6( void ) ;
extern uint32_t sd_acmd51( uint32_t *presult ) ; extern uint32_t sd_acmd51( uint32_t *presult ) ;
extern uint32_t sd_cmd13( uint32_t *status) ; extern uint32_t sd_cmd13( uint32_t *status) ;
extern void sd_poll_10mS( void ) ; extern void sd_poll_10mS( void ) ;
#ifdef PCBX9D #ifdef PCBTARANIS
extern void sdPoll10ms( void ) ; extern void sdPoll10ms( void ) ;
extern void sdInit( void ) ; extern void sdInit( void ) ;
#endif #endif
+10 -10
View File
@@ -33,7 +33,7 @@
#ifdef PCBSKY #ifdef PCBSKY
#define wdt_reset() (WDT->WDT_CR = 0xA5000001) #define wdt_reset() (WDT->WDT_CR = 0xA5000001)
#endif #endif
#ifdef PCBX9D #ifdef PCBTARANIS
#define wdt_reset() (IWDG->KR = 0x0000AAAAL) #define wdt_reset() (IWDG->KR = 0x0000AAAAL)
#endif #endif
#endif #endif
@@ -83,7 +83,7 @@ extern const char * const Swedish[] ;
#define pgm_read_byte(p) (*(p)) #define pgm_read_byte(p) (*(p))
#ifdef PCBX9D #ifdef PCBTARANIS
#define NUMBER_ANALOG 9 #define NUMBER_ANALOG 9
#else #else
#ifdef REVX #ifdef REVX
@@ -132,7 +132,7 @@ enum EnumKeys {
SW_Trainer SW_Trainer
#endif #endif
#ifdef PCBX9D #ifdef PCBTARANIS
SW_SA0, SW_SA0,
SW_SA1, SW_SA1,
SW_SA2, SW_SA2,
@@ -197,7 +197,7 @@ enum EnumKeys {
#define MAX_SKYDRSWITCH (1+SW_Trainer-SW_ThrCt+1+NUM_SKYCSW) #define MAX_SKYDRSWITCH (1+SW_Trainer-SW_ThrCt+1+NUM_SKYCSW)
#endif #endif
#ifdef PCBX9D #ifdef PCBTARANIS
#define SW_BASE SW_SA0 #define SW_BASE SW_SA0
#define SW_BASE_DIAG SW_SA0 #define SW_BASE_DIAG SW_SA0
#define MAX_PSWITCH (SW_SH2-SW_SA0+1) // 9 physical switches #define MAX_PSWITCH (SW_SH2-SW_SA0+1) // 9 physical switches
@@ -238,7 +238,7 @@ enum EnumKeys {
#ifdef PCBSKY #ifdef PCBSKY
#define CSW_INDEX 9 // Index of first custom switch #define CSW_INDEX 9 // Index of first custom switch
#endif #endif
#ifdef PCBX9D #ifdef PCBTARANIS
#define CSW_INDEX 22 // Index of first custom switch #define CSW_INDEX 22 // Index of first custom switch
#endif #endif
@@ -312,7 +312,7 @@ enum EnumKeys {
#define MIX_CYC2 11 #define MIX_CYC2 11
#define MIX_CYC3 12 #define MIX_CYC3 12
#endif #endif
#ifdef PCBX9D #ifdef PCBTARANIS
#define MIX_P3 7 #define MIX_P3 7
#define MIX_P4 8 #define MIX_P4 8
#define MIX_MAX 9 #define MIX_MAX 9
@@ -497,7 +497,7 @@ extern uint8_t convert_mode_helper(uint8_t x) ;
#define BACKLIGHT_OFF (PWM->PWM_CH_NUM[0].PWM_CDTY = 100) #define BACKLIGHT_OFF (PWM->PWM_CH_NUM[0].PWM_CDTY = 100)
#endif #endif
#ifdef PCBX9D #ifdef PCBTARANIS
extern void backlight_on( void ) ; extern void backlight_on( void ) ;
extern void backlight_off( void ) ; extern void backlight_off( void ) ;
#define BACKLIGHT_ON backlight_on() #define BACKLIGHT_ON backlight_on()
@@ -731,13 +731,13 @@ extern struct t_p1 P1values ;
#ifdef PCBSKY #ifdef PCBSKY
extern uint16_t ResetReason ; extern uint16_t ResetReason ;
#endif #endif
#ifdef PCBX9D #ifdef PCBTARANIS
extern uint32_t ResetReason ; extern uint32_t ResetReason ;
#endif #endif
extern uint8_t unexpectedShutdown ; extern uint8_t unexpectedShutdown ;
extern uint8_t SdMounted ; extern uint8_t SdMounted ;
#ifdef PCBX9D #ifdef PCBTARANIS
#include "stm32f2xx.h" #include "stm32f2xx.h"
#include "rtc.h" #include "rtc.h"
#include "stm32f2xx_rtc.h" #include "stm32f2xx_rtc.h"
@@ -749,7 +749,7 @@ void rtcInit( void ) ;
extern void setVolume( uint8_t value ) ; extern void setVolume( uint8_t value ) ;
extern uint8_t HoldVolume ; extern uint8_t HoldVolume ;
#ifdef PCBX9D #ifdef PCBTARANIS
#define INTERNAL_MODULE 0 #define INTERNAL_MODULE 0
#define EXTERNAL_MODULE 1 #define EXTERNAL_MODULE 1
#define TRAINER_MODULE 2 #define TRAINER_MODULE 2
+2 -2
View File
@@ -21,7 +21,7 @@
#ifndef lcd_h #ifndef lcd_h
#define lcd_h #define lcd_h
#ifdef PCBX9D #ifdef PCBTARANIS
#define DISPLAY_W 212 #define DISPLAY_W 212
#define DISPLAY_H 64 #define DISPLAY_H 64
#endif #endif
@@ -110,7 +110,7 @@ extern void putsTime(uint8_t x,uint8_t y,int16_t tme,uint8_t att,uint8_t att2) ;
extern void putsVolts(uint8_t x,uint8_t y, uint8_t volts, uint8_t att) ; extern void putsVolts(uint8_t x,uint8_t y, uint8_t volts, uint8_t att) ;
extern void putsVBat(uint8_t x,uint8_t y,uint8_t att) ; extern void putsVBat(uint8_t x,uint8_t y,uint8_t att) ;
#ifdef PCBX9D #ifdef PCBTARANIS
extern void backlight_set( uint16_t brightness ) ; extern void backlight_set( uint16_t brightness ) ;
#endif #endif
+2 -2
View File
@@ -13,7 +13,7 @@
* *
****************************************************************************/ ****************************************************************************/
#ifdef PCBX9D #ifdef PCBTARANIS
#define PIN_MODE_MASK 0x0003 #define PIN_MODE_MASK 0x0003
#define PIN_INPUT 0x0000 #define PIN_INPUT 0x0000
#define PIN_OUTPUT 0x0001 #define PIN_OUTPUT 0x0001
@@ -117,7 +117,7 @@ extern void config_free_pins( void ) ;
#define GPIO_SetBits( port, bits ) (port->BSRRL = bits) #define GPIO_SetBits( port, bits ) (port->BSRRL = bits)
#define GPIO_ReadInputDataBit( port, bit) ( (port->IDR & bit) ? Bit_SET : Bit_RESET) #define GPIO_ReadInputDataBit( port, bit) ( (port->IDR & bit) ? Bit_SET : Bit_RESET)
#ifdef PCBX9D #ifdef PCBTARANIS
uint32_t switchPosition( uint32_t swtch ) ; uint32_t switchPosition( uint32_t swtch ) ;
#endif #endif
+2 -2
View File
@@ -5,7 +5,7 @@
#ifdef PCBSKY #ifdef PCBSKY
#define wdt_reset() (WDT->WDT_CR = 0xA5000001) #define wdt_reset() (WDT->WDT_CR = 0xA5000001)
#endif #endif
#ifdef PCBX9D #ifdef PCBTARANIS
#define wdt_reset() (IWDG->KR = 0x0000AAAAL) #define wdt_reset() (IWDG->KR = 0x0000AAAAL)
#endif #endif
@@ -43,7 +43,7 @@ enum EnumKeys {
} ; } ;
#endif #endif
#ifdef PCBX9D #ifdef PCBTARANIS
enum EnumKeys { enum EnumKeys {
KEY_MENU , KEY_MENU ,
KEY_EXIT , KEY_EXIT ,
+1 -1
View File
@@ -25,7 +25,7 @@ extern void stop_timer0( void ) ;
extern void init_pwm( void ) ; extern void init_pwm( void ) ;
#endif #endif
#ifdef PCBX9D #ifdef PCBTARANIS
extern uint32_t Peri1_frequency ; extern uint32_t Peri1_frequency ;
extern uint32_t Peri2_frequency ; extern uint32_t Peri2_frequency ;
extern uint32_t Timer_mult1 ; extern uint32_t Timer_mult1 ;
+2 -2
View File
@@ -28,7 +28,7 @@
//#include "myeeprom.h" //#include "myeeprom.h"
#endif #endif
#ifdef PCBX9D #ifdef PCBTARANIS
#include "radio.h" #include "radio.h"
#endif #endif
@@ -48,7 +48,7 @@ uint8_t Lcd_lastPos ;
uint8_t DisplayBuf[DISPLAY_W*DISPLAY_H/8] ; uint8_t DisplayBuf[DISPLAY_W*DISPLAY_H/8] ;
#define DISPLAY_END (DisplayBuf+sizeof(DisplayBuf)) #define DISPLAY_END (DisplayBuf+sizeof(DisplayBuf))
#ifdef PCBX9D #ifdef PCBTARANIS
#define X9D_OFFSET 0 #define X9D_OFFSET 0
#define DISPLAY_START (DisplayBuf + X9D_OFFSET) #define DISPLAY_START (DisplayBuf + X9D_OFFSET)
#else #else
+4 -4
View File
@@ -25,7 +25,7 @@
#include "drivers.h" #include "drivers.h"
#endif #endif
#ifdef PCBX9D #ifdef PCBTARANIS
#include "stm32f2xx.h" #include "stm32f2xx.h"
#include "stm32f2xx_gpio.h" #include "stm32f2xx_gpio.h"
#include "radio.h" #include "radio.h"
@@ -118,7 +118,7 @@ void configure_pins( uint32_t pins, uint16_t config )
#endif #endif
#ifdef PCBX9D #ifdef PCBTARANIS
void configure_pins( uint32_t pins, uint16_t config ) void configure_pins( uint32_t pins, uint16_t config )
{ {
uint32_t address ; uint32_t address ;
@@ -389,7 +389,7 @@ uint32_t initReadTrims( void )
} }
#endif // PCBSKY #endif // PCBSKY
#ifdef PCBX9D #ifdef PCBTARANIS
void init_keys() void init_keys()
{ {
// Buttons PE10, 11, 12, PD2, 3, 7 // Buttons PE10, 11, 12, PD2, 3, 7
@@ -453,5 +453,5 @@ void setup_switches()
} }
#endif // PCBX9D #endif // PCBTARANIS
+2 -2
View File
@@ -38,7 +38,7 @@
#endif #endif
#ifdef PCBX9D #ifdef PCBTARANIS
#include "stm32f2xx_gpio.h" #include "stm32f2xx_gpio.h"
#include "stm32f2xx_rcc.h" #include "stm32f2xx_rcc.h"
#include "hal.h" #include "hal.h"
@@ -80,7 +80,7 @@ void soft_power_off()
#endif #endif
#ifdef PCBX9D #ifdef PCBTARANIS
void soft_power_off() void soft_power_off()
{ {
+5 -10
View File
@@ -54,21 +54,16 @@
#ifdef PCBTARANIS #ifdef PCBTARANIS
#include "stm32f2xx.h" #include "stm32f2xx.h"
#include "stm32f2xx_gpio.h" #include "stm32f2xx_gpio.h"
#else
#ifdef PCBX9D
#include "x9d\stm32f2xx.h"
#include "x9d\stm32f2xx_gpio.h"
#endif
#endif #endif
#if defined(PCBX9D) || defined(PCBTARANIS) #if defined(PCBTARANIS)
void bwdt_reset() void bwdt_reset()
{ {
IWDG->KR = 0xAAAA ; // reload IWDG->KR = 0xAAAA ; // reload
} }
#endif #endif
#if defined(PCBX9D) || defined(PCBTARANIS) #if defined(PCBTARANIS)
__attribute__ ((section(".bootrodata"), used)) __attribute__ ((section(".bootrodata"), used))
void _bootStart( void ) ; void _bootStart( void ) ;
@@ -80,7 +75,7 @@ const uint32_t BootVectors[] = {
} ; } ;
#endif #endif
#if defined(PCBX9D) || defined(PCBTARANIS) #if defined(PCBTARANIS)
__attribute__ ((section(".bootrodata.*"), used)) __attribute__ ((section(".bootrodata.*"), used))
#endif #endif
@@ -93,7 +88,7 @@ const uint8_t BootCode[] = {
} ; } ;
#if defined(PCBX9D) || defined(PCBTARANIS) #if defined(PCBTARANIS)
__attribute__ ((section(".bootrodata"), used)) __attribute__ ((section(".bootrodata"), used))