Skip to content

Commit

Permalink
should fix #11
Browse files Browse the repository at this point in the history
  • Loading branch information
fishpepper committed Jan 9, 2017
1 parent 688dc49 commit 58c4e8a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/stm32f1/hal_soft_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ static void hal_soft_serial_init_timer(void) {

TIM_ICStructInit(&tim_ic_init);
tim_ic_init.TIM_Channel = SOFT_SERIAL_TIMER_CH;
#if HUB_TELEMETRY_INVERTED
#if SOFT_SERIAL_INVERTED
#ifdef HUB_TELEMETRY_INVERTED
#ifdef SOFT_SERIAL_PIN_HAS_INVERTER
//board has inverter -> invert twice = no inversion
tim_ic_init.TIM_ICPolarity = TIM_ICPolarity_Falling;
#else
tim_ic_init.TIM_ICPolarity = TIM_ICPolarity_Rising;
#endif
#else
#if SOFT_SERIAL_INVERTED
#ifdef SOFT_SERIAL_PIN_HAS_INVERTER
//board has inverter -> invert
tim_ic_init.TIM_ICPolarity = TIM_ICPolarity_Rising;
#else
Expand Down

0 comments on commit 58c4e8a

Please sign in to comment.