helpfor studient
Dependents: STM32_F103-C8T6basecanblink_led
Fork of mbed-dev by
targets/TARGET_TOSHIBA/TARGET_TMPM46B/gpio_object.h@185:08ed48f1de7f, 2018-04-19 (annotated)
- Committer:
- AnnaBridge
- Date:
- Thu Apr 19 17:12:19 2018 +0100
- Revision:
- 185:08ed48f1de7f
mbed-dev library. Release version 161
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AnnaBridge | 185:08ed48f1de7f | 1 | /* mbed Microcontroller Library |
AnnaBridge | 185:08ed48f1de7f | 2 | * (C)Copyright TOSHIBA ELECTRONIC DEVICES & STORAGE CORPORATION 2017 All rights reserved |
AnnaBridge | 185:08ed48f1de7f | 3 | * |
AnnaBridge | 185:08ed48f1de7f | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
AnnaBridge | 185:08ed48f1de7f | 5 | * you may not use this file except in compliance with the License. |
AnnaBridge | 185:08ed48f1de7f | 6 | * You may obtain a copy of the License at |
AnnaBridge | 185:08ed48f1de7f | 7 | * |
AnnaBridge | 185:08ed48f1de7f | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
AnnaBridge | 185:08ed48f1de7f | 9 | * |
AnnaBridge | 185:08ed48f1de7f | 10 | * Unless required by applicable law or agreed to in writing, software |
AnnaBridge | 185:08ed48f1de7f | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
AnnaBridge | 185:08ed48f1de7f | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
AnnaBridge | 185:08ed48f1de7f | 13 | * See the License for the specific language governing permissions and |
AnnaBridge | 185:08ed48f1de7f | 14 | * limitations under the License. |
AnnaBridge | 185:08ed48f1de7f | 15 | */ |
AnnaBridge | 185:08ed48f1de7f | 16 | #ifndef MBED_GPIO_OBJECT_H |
AnnaBridge | 185:08ed48f1de7f | 17 | #define MBED_GPIO_OBJECT_H |
AnnaBridge | 185:08ed48f1de7f | 18 | |
AnnaBridge | 185:08ed48f1de7f | 19 | #include "mbed_assert.h" |
AnnaBridge | 185:08ed48f1de7f | 20 | |
AnnaBridge | 185:08ed48f1de7f | 21 | #ifdef __cplusplus |
AnnaBridge | 185:08ed48f1de7f | 22 | extern "C" { |
AnnaBridge | 185:08ed48f1de7f | 23 | #endif |
AnnaBridge | 185:08ed48f1de7f | 24 | |
AnnaBridge | 185:08ed48f1de7f | 25 | typedef struct { |
AnnaBridge | 185:08ed48f1de7f | 26 | PinName pin; |
AnnaBridge | 185:08ed48f1de7f | 27 | uint32_t mask; |
AnnaBridge | 185:08ed48f1de7f | 28 | GPIO_Port port; |
AnnaBridge | 185:08ed48f1de7f | 29 | } gpio_t; |
AnnaBridge | 185:08ed48f1de7f | 30 | |
AnnaBridge | 185:08ed48f1de7f | 31 | static inline int gpio_is_connected(const gpio_t *obj) |
AnnaBridge | 185:08ed48f1de7f | 32 | { |
AnnaBridge | 185:08ed48f1de7f | 33 | return (obj->pin != (PinName)NC); |
AnnaBridge | 185:08ed48f1de7f | 34 | } |
AnnaBridge | 185:08ed48f1de7f | 35 | |
AnnaBridge | 185:08ed48f1de7f | 36 | #ifdef __cplusplus |
AnnaBridge | 185:08ed48f1de7f | 37 | } |
AnnaBridge | 185:08ed48f1de7f | 38 | #endif |
AnnaBridge | 185:08ed48f1de7f | 39 | |
AnnaBridge | 185:08ed48f1de7f | 40 | #endif |