mbed library sources

Dependents:   Nucleo_blink_led

Fork of mbed-src by mbed official

Files at this revision

API Documentation at this revision

Comitter:
mbed_official
Date:
Mon Feb 02 16:00:07 2015 +0000
Parent:
460:3bcf9be0332c
Child:
462:e03396e14338
Commit message:
Synchronized with git revision 36d7caa0ef7b2237c394e308e3203482ff757ebf

Full URL: https://github.com/mbedmicro/mbed/commit/36d7caa0ef7b2237c394e308e3203482ff757ebf/

Targets - gpio_is_connected() for STM targets where it was not implemented

Changed in this revision

targets/hal/TARGET_STM/TARGET_NUCLEO_F070RB/gpio_object.h Show annotated file Show diff for this revision Revisions of this file
targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/gpio_object.h Show annotated file Show diff for this revision Revisions of this file
targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/gpio_object.h Show annotated file Show diff for this revision Revisions of this file
targets/hal/TARGET_STM/TARGET_NUCLEO_F303RE/gpio_object.h Show annotated file Show diff for this revision Revisions of this file
targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/gpio_object.h Show annotated file Show diff for this revision Revisions of this file
targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/gpio_object.h Show annotated file Show diff for this revision Revisions of this file
targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/gpio_object.h Show annotated file Show diff for this revision Revisions of this file
targets/hal/TARGET_STM/TARGET_STM32F3XX/gpio_object.h Show annotated file Show diff for this revision Revisions of this file
targets/hal/TARGET_STM/TARGET_STM32F4XX/gpio_object.h Show annotated file Show diff for this revision Revisions of this file
--- a/targets/hal/TARGET_STM/TARGET_NUCLEO_F070RB/gpio_object.h	Mon Feb 02 11:30:07 2015 +0000
+++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_F070RB/gpio_object.h	Mon Feb 02 16:00:07 2015 +0000
@@ -64,6 +64,10 @@
     return ((*obj->reg_in & obj->mask) ? 1 : 0);
 }
 
+static inline int gpio_is_connected(const gpio_t *obj) {
+    return obj->pin != (PinName)NC;
+}
+
 #ifdef __cplusplus
 }
 #endif
--- a/targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/gpio_object.h	Mon Feb 02 11:30:07 2015 +0000
+++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_F103RB/gpio_object.h	Mon Feb 02 16:00:07 2015 +0000
@@ -64,6 +64,11 @@
     return ((*obj->reg_in & obj->mask) ? 1 : 0);
 }
 
+static inline int gpio_is_connected(const gpio_t *obj) {
+    return obj->pin != (PinName)NC;
+}
+
+
 #ifdef __cplusplus
 }
 #endif
--- a/targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/gpio_object.h	Mon Feb 02 11:30:07 2015 +0000
+++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_F302R8/gpio_object.h	Mon Feb 02 16:00:07 2015 +0000
@@ -64,6 +64,10 @@
     return ((*obj->reg_in & obj->mask) ? 1 : 0);
 }
 
+static inline int gpio_is_connected(const gpio_t *obj) {
+    return obj->pin != (PinName)NC;
+}
+
 #ifdef __cplusplus
 }
 #endif
--- a/targets/hal/TARGET_STM/TARGET_NUCLEO_F303RE/gpio_object.h	Mon Feb 02 11:30:07 2015 +0000
+++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_F303RE/gpio_object.h	Mon Feb 02 16:00:07 2015 +0000
@@ -64,6 +64,10 @@
     return ((*obj->reg_in & obj->mask) ? 1 : 0);
 }
 
+static inline int gpio_is_connected(const gpio_t *obj) {
+    return obj->pin != (PinName)NC;
+}
+
 #ifdef __cplusplus
 }
 #endif
--- a/targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/gpio_object.h	Mon Feb 02 11:30:07 2015 +0000
+++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_F334R8/gpio_object.h	Mon Feb 02 16:00:07 2015 +0000
@@ -64,6 +64,10 @@
     return ((*obj->reg_in & obj->mask) ? 1 : 0);
 }
 
+static inline int gpio_is_connected(const gpio_t *obj) {
+    return obj->pin != (PinName)NC;
+}
+
 #ifdef __cplusplus
 }
 #endif
--- a/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/gpio_object.h	Mon Feb 02 11:30:07 2015 +0000
+++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_L053R8/gpio_object.h	Mon Feb 02 16:00:07 2015 +0000
@@ -64,6 +64,10 @@
     return ((*obj->reg_in & obj->mask) ? 1 : 0);
 }
 
+static inline int gpio_is_connected(const gpio_t *obj) {
+    return obj->pin != (PinName)NC;
+}
+
 #ifdef __cplusplus
 }
 #endif
--- a/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/gpio_object.h	Mon Feb 02 11:30:07 2015 +0000
+++ b/targets/hal/TARGET_STM/TARGET_NUCLEO_L152RE/gpio_object.h	Mon Feb 02 16:00:07 2015 +0000
@@ -64,6 +64,10 @@
     return ((*obj->reg_in & obj->mask) ? 1 : 0);
 }
 
+static inline int gpio_is_connected(const gpio_t *obj) {
+    return obj->pin != (PinName)NC;
+}
+
 #ifdef __cplusplus
 }
 #endif
--- a/targets/hal/TARGET_STM/TARGET_STM32F3XX/gpio_object.h	Mon Feb 02 11:30:07 2015 +0000
+++ b/targets/hal/TARGET_STM/TARGET_STM32F3XX/gpio_object.h	Mon Feb 02 16:00:07 2015 +0000
@@ -62,6 +62,10 @@
     return ((*obj->reg_in & obj->mask) ? 1 : 0);
 }
 
+static inline int gpio_is_connected(const gpio_t *obj) {
+    return obj->pin != (PinName)NC;
+}
+
 #ifdef __cplusplus
 }
 #endif
--- a/targets/hal/TARGET_STM/TARGET_STM32F4XX/gpio_object.h	Mon Feb 02 11:30:07 2015 +0000
+++ b/targets/hal/TARGET_STM/TARGET_STM32F4XX/gpio_object.h	Mon Feb 02 16:00:07 2015 +0000
@@ -46,6 +46,10 @@
     return ((*obj->reg_in & obj->mask) ? 1 : 0);
 }
 
+static inline int gpio_is_connected(const gpio_t *obj) {
+    return obj->pin != (PinName)NC;
+}
+
 #ifdef __cplusplus
 }
 #endif