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

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Committer:
AnnaBridge
Date:
Wed Feb 20 20:53:29 2019 +0000
Revision:
172:65be27845400
Parent:
171:3a7713b1edbc
mbed library release version 165

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Kojto 148:fd96258d940d 1 /* mbed Microcontroller Library
Kojto 148:fd96258d940d 2 * Copyright (c) 2006-2013 ARM Limited
Kojto 148:fd96258d940d 3 *
Kojto 148:fd96258d940d 4 * Licensed under the Apache License, Version 2.0 (the "License");
Kojto 148:fd96258d940d 5 * you may not use this file except in compliance with the License.
Kojto 148:fd96258d940d 6 * You may obtain a copy of the License at
Kojto 148:fd96258d940d 7 *
Kojto 148:fd96258d940d 8 * http://www.apache.org/licenses/LICENSE-2.0
Kojto 148:fd96258d940d 9 *
Kojto 148:fd96258d940d 10 * Unless required by applicable law or agreed to in writing, software
Kojto 148:fd96258d940d 11 * distributed under the License is distributed on an "AS IS" BASIS,
Kojto 148:fd96258d940d 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Kojto 148:fd96258d940d 13 * See the License for the specific language governing permissions and
Kojto 148:fd96258d940d 14 * limitations under the License.
Kojto 148:fd96258d940d 15 */
Kojto 148:fd96258d940d 16 #ifndef MBED_GPIO_OBJECT_H
Kojto 148:fd96258d940d 17 #define MBED_GPIO_OBJECT_H
Kojto 148:fd96258d940d 18
Kojto 148:fd96258d940d 19 #ifdef __cplusplus
Kojto 148:fd96258d940d 20 extern "C" {
Kojto 148:fd96258d940d 21 #endif
Kojto 148:fd96258d940d 22
Kojto 148:fd96258d940d 23 typedef struct {
Kojto 148:fd96258d940d 24 PinName pin;
Kojto 148:fd96258d940d 25 } gpio_t;
Kojto 148:fd96258d940d 26
Kojto 148:fd96258d940d 27 static inline int gpio_is_connected(const gpio_t *obj)
Kojto 148:fd96258d940d 28 {
Kojto 148:fd96258d940d 29 return obj->pin != (PinName)NC;
Kojto 148:fd96258d940d 30 }
Kojto 148:fd96258d940d 31
Kojto 148:fd96258d940d 32 #ifdef __cplusplus
Kojto 148:fd96258d940d 33 }
Kojto 148:fd96258d940d 34 #endif
Kojto 148:fd96258d940d 35
Kojto 148:fd96258d940d 36 #endif