Skip to content

Commit

Permalink
add PEDAL adc sets
Browse files Browse the repository at this point in the history
  • Loading branch information
geohot committed Feb 28, 2018
1 parent ccaa310 commit eb1fd75
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions board/gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,14 @@ void gpio_init() {
set_gpio_mode(GPIOC, 2, MODE_ANALOG);
set_gpio_mode(GPIOC, 3, MODE_ANALOG);

#ifdef PEDAL
// comma pedal has inputs on C0 and C1
set_gpio_mode(GPIOC, 0, MODE_ANALOG);
set_gpio_mode(GPIOC, 1, MODE_ANALOG);
// DAC outputs on A4 and A5
// apparently they don't need GPIO setup
#endif

// C8: FAN aka TIM3_CH4
set_gpio_alternate(GPIOC, 8, GPIO_AF2_TIM3);

Expand Down

0 comments on commit eb1fd75

Please sign in to comment.