Skip to content

Commit

Permalink
[stm32][peripherals] max1158: enable clock for alternate function io
Browse files Browse the repository at this point in the history
hopefully the b2 imu works with this again...
  • Loading branch information
flixr committed Dec 13, 2012
1 parent 5b27781 commit 9b424ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sw/airborne/arch/stm32/peripherals/max1168_arch.c
Expand Up @@ -29,9 +29,9 @@ void max1168_arch_init( void ) {

/* configure external interrupt exti2 on PD2( data ready ) v1.0*/
/* PB2( data ready ) v1.1*/
rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_IOPBEN);
rcc_peripheral_enable_clock(&RCC_APB2ENR, RCC_APB2ENR_IOPBEN | RCC_APB2ENR_AFIOEN);
gpio_set_mode(GPIOB, GPIO_MODE_INPUT,
GPIO_CNF_INPUT_FLOAT, GPIO2);
GPIO_CNF_INPUT_FLOAT, GPIO2);

exti_select_source(EXTI2, GPIOB);
exti_set_trigger(EXTI2, EXTI_TRIGGER_FALLING);
Expand Down

0 comments on commit 9b424ba

Please sign in to comment.