Skip to content

Commit

Permalink
[spektrum] fix some pin usage
Browse files Browse the repository at this point in the history
  • Loading branch information
gautierhattenberger committed Jun 3, 2014
1 parent d76e4f1 commit c062130
Showing 1 changed file with 7 additions and 1 deletion.
Expand Up @@ -697,7 +697,7 @@ void SecondaryUart(_ISR)(void) {
void radio_control_spektrum_try_bind(void) {

/* Init GPIO for the bind pin */
gpio_setup_input(SPEKTRUM_BIND_PIN_PORT, GPIO_MODE_INPUT);
gpio_setup_input(SPEKTRUM_BIND_PIN_PORT, SPEKTRUM_BIND_PIN);

/* exit if the BIND_PIN is high, it needs to
be pulled low at startup to initiate bind */
Expand Down Expand Up @@ -745,4 +745,10 @@ void radio_control_spektrum_try_bind(void) {
sys_time_usleep(120);
}
#endif /* RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT */

/* Set conf pin as input in case it is different from RX pin */
gpio_setup_input(SPEKTRUM_PRIMARY_BIND_CONF_PORT, SPEKTRUM_PRIMARY_BIND_CONF_PIN);
#ifdef RADIO_CONTROL_SPEKTRUM_SECONDARY_PORT
gpio_setup_input(SPEKTRUM_SECONDARY_BIND_CONF_PORT, SPEKTRUM_SECONDARY_BIND_CONF_PIN);
#endif
}

0 comments on commit c062130

Please sign in to comment.