Skip to content

Commit

Permalink
Fix DALRC and RADIX targets
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalentity committed May 13, 2018
1 parent 532786e commit eabd6e1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 12 deletions.
5 changes: 2 additions & 3 deletions src/main/target/DALRCF405/target.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "drivers/pwm_mapping.h"
#include "drivers/timer.h"

const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
const timerHardware_t timerHardware[] = {
{ TIM12, IO_TAG(PB15), TIM_Channel_2, 0, IOCFG_AF_PP_PD, GPIO_AF_TIM10, TIM_USE_PPM },

{ TIM3, IO_TAG(PB0), TIM_Channel_3, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM3, TIM_USE_MC_MOTOR | TIM_USE_MC_SERVO | TIM_USE_FW_MOTOR },
Expand All @@ -37,5 +37,4 @@ const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
{ TIM2, IO_TAG(PA5), TIM_Channel_1, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM2, TIM_USE_PWM },
};



const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
5 changes: 0 additions & 5 deletions src/main/target/DALRCF405/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,4 @@
#define TARGET_IO_PORTD 0xffff

//TIMER
#define USABLE_TIMER_CHANNEL_COUNT 11
#define MAX_PWM_OUTPUT_PORTS 10
#define USED_TIMERS (TIM_N(1)|TIM_N(2)|TIM_N(3)|TIM_N(4)|TIM_N(8)|TIM_N(12))



4 changes: 3 additions & 1 deletion src/main/target/RADIX/target.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "drivers/timer.h"

/* TIMERS */
const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
const timerHardware_t timerHardware[] = {
{ TIM12, IO_TAG(PB14), TIM_Channel_1, 0, IOCFG_AF_PP_PD, GPIO_AF_TIM12, TIM_USE_PPM },
{ TIM5, IO_TAG(PA2), TIM_Channel_3, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM5, TIM_USE_MC_MOTOR }, // S3_OUT
{ TIM5, IO_TAG(PA3), TIM_Channel_4, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM5, TIM_USE_MC_MOTOR }, // S4_OUT
Expand All @@ -33,3 +33,5 @@ const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
{ TIM8, IO_TAG(PC8), TIM_Channel_3, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM8, TIM_USE_MC_MOTOR }, // S5_OUT
{ TIM3, IO_TAG(PB0), TIM_Channel_3, 1, IOCFG_AF_PP_PD, GPIO_AF_TIM3, TIM_USE_MC_MOTOR }, // S6_OUT
};

const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
3 changes: 0 additions & 3 deletions src/main/target/RADIX/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,3 @@
#define TARGET_IO_PORTB 0xffff
#define TARGET_IO_PORTC 0xffff
#define TARGET_IO_PORTD (BIT(2))

#define USABLE_TIMER_CHANNEL_COUNT 7
#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(5) | TIM_N(12) )

0 comments on commit eabd6e1

Please sign in to comment.