mbed library sources. Supersedes mbed-src. Edited target satm32f446 for user USART3 pins

Dependents:   IGLOO_board

Fork of mbed-dev by mbed official

Committer:
AnnaBridge
Date:
Thu Apr 19 17:12:19 2018 +0100
Revision:
184:08ed48f1de7f
mbed-dev library. Release version 161

Who changed what in which revision?

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