mbed libraries for KL25Z

Dependents:   FRDM_RGBLED

Revision:
7:73c5efe92a6c
Parent:
6:0d4e7384bff6
Child:
8:c14af7958ef5
--- a/gpio_api.h	Fri Oct 12 10:06:08 2012 +0000
+++ b/gpio_api.h	Tue Oct 23 09:20:18 2012 +0000
@@ -1,7 +1,6 @@
 /* mbed Microcontroller Library - gpio_api
  * Copyright (c) 2009-2011 ARM Limited. All rights reserved.
- */ 
- 
+ */
 #ifndef MBED_GPIO_API_H
 #define MBED_GPIO_API_H
 
@@ -9,12 +8,12 @@
 
 #ifdef __cplusplus
 extern "C" {
-#endif 
+#endif
 
 /* This version of the gpio API caches the gpio register pointer and the pin mask */
 typedef struct {
-    PinName             pin;
-    uint32_t            mask;
+    PinName  pin;
+    uint32_t mask;
     
     __IO uint32_t *reg_dir;
     __IO uint32_t *reg_set;
@@ -22,8 +21,14 @@
     __I  uint32_t *reg_in;
 } gpio_object;
 
-void gpio_init (gpio_object *obj, PinName pin, PinDirection direction);
+/* Set the given pin as GPIO
+ * @param pin The pin to be set as GPIO
+ * @return The GPIO port mask for this pin
+ **/
+uint32_t gpio_set (PinName pin);
 
+/* GPIO object */
+void gpio_init(gpio_object *obj, PinName pin, PinDirection direction);
 void gpio_mode(gpio_object *obj, PinMode mode);
 void gpio_dir (gpio_object *obj, PinDirection direction);
 
@@ -40,6 +45,6 @@
 
 #ifdef __cplusplus
 }
-#endif 
+#endif
 
-#endif 
+#endif