Skip to content

Commit

Permalink
s fixed otype
Browse files Browse the repository at this point in the history
  • Loading branch information
haukepetersen committed Mar 17, 2016
1 parent 71a6a87 commit 763c909
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpu/stm32f4/periph/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ int gpio_init(gpio_t pin, gpio_mode_t mode)
port->PUPDR |= (((mode >> 2) & 0x3) << (2 * pin_num));
/* set output mode */
port->OTYPER &= ~(1 << pin_num);
port->OTYPER &= (((mode >> 4) & 0x1) << (2 * pin_num));
port->OTYPER |= (((mode >> 4) & 0x1) << pin_num);
/* reset speed value and clear pin */
port->OSPEEDR |= (3 << (2 * pin_num));
port->BSRRH = (1 << pin_num);
Expand Down

0 comments on commit 763c909

Please sign in to comment.