Skip to content

Commit

Permalink
[stm32f1] gpio_setup_pin_af with uint32_t for af
Browse files Browse the repository at this point in the history
  • Loading branch information
flixr committed Jun 20, 2014
1 parent 6665181 commit aca1e01
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sw/airborne/arch/stm32/mcu_periph/gpio_arch.c
Expand Up @@ -86,7 +86,7 @@ void gpio_setup_input(uint32_t port, uint16_t gpios) {
gpio_set_mode(port, GPIO_MODE_INPUT, GPIO_CNF_INPUT_FLOAT, gpios);
}

void gpio_setup_pin_af(uint32_t port, uint16_t pin, uint8_t af, bool_t is_output) {
void gpio_setup_pin_af(uint32_t port, uint16_t pin, uint32_t af, bool_t is_output) {
gpio_enable_clock(port);
/* remap alternate function if needed */
if (af) {
Expand Down
4 changes: 4 additions & 0 deletions sw/airborne/arch/stm32/mcu_periph/gpio_arch.h
Expand Up @@ -51,7 +51,11 @@ extern void gpio_setup_input(uint32_t port, uint16_t gpios);
* Setup a gpio for input or output with alternate function.
* This is an STM32 specific helper funtion and should only be used in stm32 arch code.
*/
#if defined(STM32F1)
extern void gpio_setup_pin_af(uint32_t port, uint16_t pin, uint32_t af, bool_t is_output);
#else
extern void gpio_setup_pin_af(uint32_t port, uint16_t pin, uint8_t af, bool_t is_output);
#endif

/**
* Setup a gpio for analog use.
Expand Down

0 comments on commit aca1e01

Please sign in to comment.