Merge pull request #2966 from bnn1044/master

Add PWM beeper to CL_RACINGF4  And define clean up
This commit is contained in:
Martin Budden 2017-05-02 07:22:37 +01:00 committed by GitHub
commit 52765b8266
2 changed files with 6 additions and 6 deletions

View File

@ -45,6 +45,7 @@ const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
DEF_TIM(TIM2, CH4, PA3, TIM_USE_MOTOR, TIMER_OUTPUT_STANDARD, 1), // S3_OUT D1_ST6 DEF_TIM(TIM2, CH4, PA3, TIM_USE_MOTOR, TIMER_OUTPUT_STANDARD, 1), // S3_OUT D1_ST6
DEF_TIM(TIM2, CH3, PA2, TIM_USE_MOTOR, TIMER_OUTPUT_STANDARD, 0), // S4_OUT D1_ST1 DEF_TIM(TIM2, CH3, PA2, TIM_USE_MOTOR, TIMER_OUTPUT_STANDARD, 0), // S4_OUT D1_ST1
#if defined(CL_RACINGF4) #if defined(CL_RACINGF4)
DEF_TIM(TIM3, CH1, PB4, TIM_USE_BEEPER, TIMER_OUTPUT_ENABLED, 0 ), // BEEPER PWM
DEF_TIM(TIM4, CH4, PB9, TIM_USE_MOTOR | TIM_USE_LED, TIMER_OUTPUT_STANDARD, 0), // S5_OUT DEF_TIM(TIM4, CH4, PB9, TIM_USE_MOTOR | TIM_USE_LED, TIMER_OUTPUT_STANDARD, 0), // S5_OUT
#elif defined(OMNIBUSF4SD) #elif defined(OMNIBUSF4SD)
DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, TIMER_OUTPUT_STANDARD, 0), // S5_OUT DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, TIMER_OUTPUT_STANDARD, 0), // S5_OUT

View File

@ -41,6 +41,7 @@
//#define LED1 PB4 // Remove this at the next major release //#define LED1 PB4 // Remove this at the next major release
#define BEEPER PB4 #define BEEPER PB4
#define BEEPER_INVERTED #define BEEPER_INVERTED
#define BEEPER_PWM_HZ 3800 // Beeper PWM frequency in Hz
#ifdef OMNIBUSF4SD #ifdef OMNIBUSF4SD
#define INVERTER_PIN_UART6 PC8 // Omnibus F4 V3 and later #define INVERTER_PIN_UART6 PC8 // Omnibus F4 V3 and later
@ -190,16 +191,14 @@
#else #else
//#define RSSI_ADC_PIN PA0 //#define RSSI_ADC_PIN PA0
#endif #endif
#define USE_ESC_SENSOR #define USE_ESC_SENSOR
#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
#define AVOID_UART1_FOR_PWM_PPM
#if defined(CL_RACINGF4) #if defined(CL_RACINGF4)
#define DEFAULT_FEATURES (FEATURE_TELEMETRY | FEATURE_OSD ) #define DEFAULT_FEATURES (FEATURE_TELEMETRY | FEATURE_OSD )
#else #else
#define DEFAULT_FEATURES (FEATURE_OSD) #define DEFAULT_FEATURES (FEATURE_OSD)
#define AVOID_UART1_FOR_PWM_PPM
#endif #endif
#define SPEKTRUM_BIND_PIN UART1_RX_PIN #define SPEKTRUM_BIND_PIN UART1_RX_PIN
#define USE_SERIAL_4WAY_BLHELI_INTERFACE #define USE_SERIAL_4WAY_BLHELI_INTERFACE
@ -209,13 +208,13 @@
#define TARGET_IO_PORTD BIT(2) #define TARGET_IO_PORTD BIT(2)
#ifdef CL_RACINGF4 #ifdef CL_RACINGF4
#define USABLE_TIMER_CHANNEL_COUNT 6 #define USABLE_TIMER_CHANNEL_COUNT 7
#define USED_TIMERS ( TIM_N(4) | TIM_N(8) ) #define USED_TIMERS ( TIM_N(3) | TIM_N(4) | TIM_N(4) | TIM_N(8) )
#else #else
#ifdef OMNIBUSF4SD #ifdef OMNIBUSF4SD
#define USABLE_TIMER_CHANNEL_COUNT 13 #define USABLE_TIMER_CHANNEL_COUNT 13
#else #else
#define USABLE_TIMER_CHANNEL_COUNT 12 #define USABLE_TIMER_CHANNEL_COUNT 12
#endif #endif
#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(12) | TIM_N(8) | TIM_N(9)) #define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(12) | TIM_N(8) | TIM_N(9))
#endif #endif