Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more
Diff: targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/gpio_api.c
- Revision:
- 113:65a335a675de
- Parent:
- 84:f54042cbc282
- Child:
- 174:8bb9f3a33240
--- a/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/gpio_api.c Fri Mar 07 16:00:07 2014 +0000
+++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/gpio_api.c Mon Mar 10 11:30:07 2014 +0000
@@ -41,7 +41,7 @@
return (uint32_t)(1 << ((uint32_t)pin & 0xF)); // Return the pin mask
}
-void gpio_init(gpio_t *obj, PinName pin, PinDirection direction) {
+void gpio_init(gpio_t *obj, PinName pin) {
if (pin == NC) return;
uint32_t port_index = STM_PORT(pin);
@@ -56,14 +56,6 @@
obj->reg_in = &gpio->IDR;
obj->reg_set = &gpio->BSRRL;
obj->reg_clr = &gpio->BSRRH;
-
- // Configure GPIO
- if (direction == PIN_OUTPUT) {
- pin_function(pin, STM_PIN_DATA(GPIO_Mode_OUT, GPIO_OType_PP, GPIO_PuPd_NOPULL, 0xFF));
- }
- else { // PIN_INPUT
- pin_function(pin, STM_PIN_DATA(GPIO_Mode_IN, 0, GPIO_PuPd_NOPULL, 0xFF));
- }
}
void gpio_mode(gpio_t *obj, PinMode mode) {

