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
+3 -6
View File
@@ -41,7 +41,8 @@
#ifdef PCBSKY
#include "board.h"
#endif
#ifdef PCBX9D
#ifdef PCBTARANIS
#include "stm32f2xx.h"
#endif
@@ -133,10 +134,6 @@ void disk_timerproc (void);
volatile extern BYTE Timer1, Timer2; /* 100Hz decrement timer */
#endif
//#ifdef PCBX9D
//volatile extern DWORD Timer1, Timer2; /* 100Hz decrement timer */
//#endif
//------------------------------------------------------------------------------
/// 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_cmd13( uint32_t *status) ;
extern void sd_poll_10mS( void ) ;
#ifdef PCBX9D
#ifdef PCBTARANIS
extern void sdPoll10ms( void ) ;
extern void sdInit( void ) ;
#endif
+10 -10
View File
@@ -33,7 +33,7 @@
#ifdef PCBSKY
#define wdt_reset() (WDT->WDT_CR = 0xA5000001)
#endif
#ifdef PCBX9D
#ifdef PCBTARANIS
#define wdt_reset() (IWDG->KR = 0x0000AAAAL)
#endif
#endif
@@ -83,7 +83,7 @@ extern const char * const Swedish[] ;
#define pgm_read_byte(p) (*(p))
#ifdef PCBX9D
#ifdef PCBTARANIS
#define NUMBER_ANALOG 9
#else
#ifdef REVX
@@ -132,7 +132,7 @@ enum EnumKeys {
SW_Trainer
#endif
#ifdef PCBX9D
#ifdef PCBTARANIS
SW_SA0,
SW_SA1,
SW_SA2,
@@ -197,7 +197,7 @@ enum EnumKeys {
#define MAX_SKYDRSWITCH (1+SW_Trainer-SW_ThrCt+1+NUM_SKYCSW)
#endif
#ifdef PCBX9D
#ifdef PCBTARANIS
#define SW_BASE SW_SA0
#define SW_BASE_DIAG SW_SA0
#define MAX_PSWITCH (SW_SH2-SW_SA0+1) // 9 physical switches
@@ -238,7 +238,7 @@ enum EnumKeys {
#ifdef PCBSKY
#define CSW_INDEX 9 // Index of first custom switch
#endif
#ifdef PCBX9D
#ifdef PCBTARANIS
#define CSW_INDEX 22 // Index of first custom switch
#endif
@@ -312,7 +312,7 @@ enum EnumKeys {
#define MIX_CYC2 11
#define MIX_CYC3 12
#endif
#ifdef PCBX9D
#ifdef PCBTARANIS
#define MIX_P3 7
#define MIX_P4 8
#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)
#endif
#ifdef PCBX9D
#ifdef PCBTARANIS
extern void backlight_on( void ) ;
extern void backlight_off( void ) ;
#define BACKLIGHT_ON backlight_on()
@@ -731,13 +731,13 @@ extern struct t_p1 P1values ;
#ifdef PCBSKY
extern uint16_t ResetReason ;
#endif
#ifdef PCBX9D
#ifdef PCBTARANIS
extern uint32_t ResetReason ;
#endif
extern uint8_t unexpectedShutdown ;
extern uint8_t SdMounted ;
#ifdef PCBX9D
#ifdef PCBTARANIS
#include "stm32f2xx.h"
#include "rtc.h"
#include "stm32f2xx_rtc.h"
@@ -749,7 +749,7 @@ void rtcInit( void ) ;
extern void setVolume( uint8_t value ) ;
extern uint8_t HoldVolume ;
#ifdef PCBX9D
#ifdef PCBTARANIS
#define INTERNAL_MODULE 0
#define EXTERNAL_MODULE 1
#define TRAINER_MODULE 2
+2 -2
View File
@@ -21,7 +21,7 @@
#ifndef lcd_h
#define lcd_h
#ifdef PCBX9D
#ifdef PCBTARANIS
#define DISPLAY_W 212
#define DISPLAY_H 64
#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 putsVBat(uint8_t x,uint8_t y,uint8_t att) ;
#ifdef PCBX9D
#ifdef PCBTARANIS
extern void backlight_set( uint16_t brightness ) ;
#endif
+2 -2
View File
@@ -13,7 +13,7 @@
*
****************************************************************************/
#ifdef PCBX9D
#ifdef PCBTARANIS
#define PIN_MODE_MASK 0x0003
#define PIN_INPUT 0x0000
#define PIN_OUTPUT 0x0001
@@ -117,7 +117,7 @@ extern void config_free_pins( void ) ;
#define GPIO_SetBits( port, bits ) (port->BSRRL = bits)
#define GPIO_ReadInputDataBit( port, bit) ( (port->IDR & bit) ? Bit_SET : Bit_RESET)
#ifdef PCBX9D
#ifdef PCBTARANIS
uint32_t switchPosition( uint32_t swtch ) ;
#endif
+2 -2
View File
@@ -5,7 +5,7 @@
#ifdef PCBSKY
#define wdt_reset() (WDT->WDT_CR = 0xA5000001)
#endif
#ifdef PCBX9D
#ifdef PCBTARANIS
#define wdt_reset() (IWDG->KR = 0x0000AAAAL)
#endif
@@ -43,7 +43,7 @@ enum EnumKeys {
} ;
#endif
#ifdef PCBX9D
#ifdef PCBTARANIS
enum EnumKeys {
KEY_MENU ,
KEY_EXIT ,
+1 -1
View File
@@ -25,7 +25,7 @@ extern void stop_timer0( void ) ;
extern void init_pwm( void ) ;
#endif
#ifdef PCBX9D
#ifdef PCBTARANIS
extern uint32_t Peri1_frequency ;
extern uint32_t Peri2_frequency ;
extern uint32_t Timer_mult1 ;