We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 585b369 + fac01e3 commit f4f34a0Copy full SHA for f4f34a0
libraries/mbed/targets/hal/STM/TARGET_STM32F4XX/gpio_api.c
@@ -22,7 +22,7 @@ uint32_t gpio_set(PinName pin) {
22
// Enable GPIO peripheral clock
23
RCC->AHB1ENR |= 1 << port_index;
24
25
- pin_function(pin, 0);
+ pin_function(pin, STM_PIN_DATA(0, 0));
26
return 1 << ((uint32_t) pin & 0xF);
27
}
28
@@ -55,7 +55,7 @@ void gpio_mode(gpio_t *obj, PinMode mode) {
55
56
void gpio_dir(gpio_t *obj, PinDirection direction) {
57
switch (direction) {
58
- case PIN_INPUT : pin_function(obj->pin, 0); break;
59
- case PIN_OUTPUT: pin_function(obj->pin, 1); break;
+ case PIN_INPUT : pin_function(obj->pin, STM_PIN_DATA(0, 0)); break;
+ case PIN_OUTPUT: pin_function(obj->pin, STM_PIN_DATA(1, 0)); break;
60
61
0 commit comments