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

pull/879/head
0xc0170 2015-02-02 15:22:55 +00:00
parent c53fab9e3c
commit 5bd982c171
9 changed files with 37 additions and 0 deletions

View File

@ -64,6 +64,10 @@ static inline int gpio_read(gpio_t *obj)
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

View File

@ -64,6 +64,11 @@ static inline int gpio_read(gpio_t *obj)
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

View File

@ -64,6 +64,10 @@ static inline int gpio_read(gpio_t *obj)
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

View File

@ -64,6 +64,10 @@ static inline int gpio_read(gpio_t *obj)
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

View File

@ -64,6 +64,10 @@ static inline int gpio_read(gpio_t *obj)
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

View File

@ -64,6 +64,10 @@ static inline int gpio_read(gpio_t *obj)
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

View File

@ -64,6 +64,10 @@ static inline int gpio_read(gpio_t *obj)
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

View File

@ -62,6 +62,10 @@ static inline int gpio_read(gpio_t *obj) {
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

View File

@ -46,6 +46,10 @@ static inline int gpio_read(gpio_t *obj) {
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