Skip to content

Commit

Permalink
s stml1 fixed otype
Browse files Browse the repository at this point in the history
  • Loading branch information
haukepetersen committed Mar 17, 2016
1 parent 763c909 commit 31ae5c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpu/stm32l1/periph/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,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);
/* finally set pin speed to maximum and reset output */
port->OSPEEDR |= (3 << (2 * pin_num));
port->BRR = (1 << pin_num);
Expand Down

0 comments on commit 31ae5c7

Please sign in to comment.