mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Revision:
135:067cc8ba23da
Parent:
125:23cc3068a9e4
Child:
227:7bd0639b8911
--- a/targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/gpio_api.c	Tue Mar 25 09:30:07 2014 +0000
+++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/gpio_api.c	Tue Mar 25 10:15:07 2014 +0000
@@ -33,7 +33,7 @@
 
 extern uint32_t Set_GPIO_Clock(uint32_t port_idx);
 
-uint32_t gpio_set(PinName pin) {  
+uint32_t gpio_set(PinName pin) {
     if (pin == NC) return 0;
 
     pin_function(pin, STM_PIN_DATA(GPIO_Mode_IN, 0, GPIO_PuPd_NOPULL, 0xFF));
@@ -45,11 +45,11 @@
     if (pin == NC) return;
 
     uint32_t port_index = STM_PORT(pin);
-  
+
     // Enable GPIO clock
     uint32_t gpio_add = Set_GPIO_Clock(port_index);
     GPIO_TypeDef *gpio = (GPIO_TypeDef *)gpio_add;
-    
+
     // Fill GPIO object structure for future use
     obj->pin     = pin;
     obj->mask    = gpio_set(pin);
@@ -65,8 +65,7 @@
 void gpio_dir(gpio_t *obj, PinDirection direction) {
     if (direction == PIN_OUTPUT) {
         pin_function(obj->pin, STM_PIN_DATA(GPIO_Mode_OUT, GPIO_OType_PP, GPIO_PuPd_NOPULL, 0xFF));
-    }
-    else { // PIN_INPUT
+    } else { // PIN_INPUT
         pin_function(obj->pin, STM_PIN_DATA(GPIO_Mode_IN, 0, GPIO_PuPd_NOPULL, 0xFF));
     }
 }