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_OBJECTS_H
Kojto 148:fd96258d940d 17 #define MBED_OBJECTS_H
Kojto 148:fd96258d940d 18
Kojto 148:fd96258d940d 19 #include "cmsis.h"
Kojto 148:fd96258d940d 20 #include "PortNames.h"
Kojto 148:fd96258d940d 21 #include "PeripheralNames.h"
Kojto 148:fd96258d940d 22 #include "PinNames.h"
AnnaBridge 172:65be27845400 23 #include <stddef.h>
Kojto 148:fd96258d940d 24
Kojto 148:fd96258d940d 25 #ifdef __cplusplus
Kojto 148:fd96258d940d 26 extern "C" {
Kojto 148:fd96258d940d 27 #endif
Kojto 148:fd96258d940d 28
Kojto 148:fd96258d940d 29 struct gpio_irq_s {
Kojto 148:fd96258d940d 30 uint32_t port;
Kojto 148:fd96258d940d 31 uint32_t pin;
Kojto 148:fd96258d940d 32 uint32_t ch;
Kojto 148:fd96258d940d 33 };
Kojto 148:fd96258d940d 34
Kojto 148:fd96258d940d 35 struct port_s {
Kojto 148:fd96258d940d 36 PortName port;
Kojto 148:fd96258d940d 37 uint32_t mask;
Kojto 148:fd96258d940d 38 };
Kojto 148:fd96258d940d 39
Kojto 148:fd96258d940d 40 struct pwmout_s {
Kojto 148:fd96258d940d 41 PWMName pwm_name;
Kojto 148:fd96258d940d 42 };
Kojto 148:fd96258d940d 43
Kojto 148:fd96258d940d 44 struct serial_s {
Kojto 148:fd96258d940d 45 int index;
Kojto 148:fd96258d940d 46 };
Kojto 148:fd96258d940d 47
Kojto 148:fd96258d940d 48 struct analogin_s {
Kojto 148:fd96258d940d 49 ADCName adc;
Kojto 148:fd96258d940d 50 };
Kojto 148:fd96258d940d 51
Kojto 148:fd96258d940d 52 struct i2c_s {
Kojto 148:fd96258d940d 53 uint32_t instance;
Kojto 148:fd96258d940d 54 uint8_t next_repeated_start;
Kojto 148:fd96258d940d 55 };
Kojto 148:fd96258d940d 56
Kojto 148:fd96258d940d 57 struct spi_s {
Kojto 148:fd96258d940d 58 uint32_t instance;
Kojto 148:fd96258d940d 59 uint8_t bits;
Kojto 148:fd96258d940d 60 };
Kojto 148:fd96258d940d 61
AnnaBridge 172:65be27845400 62 #if DEVICE_FLASH
AnnaBridge 165:d1b4690b3f8b 63 struct flash_s {
AnnaBridge 165:d1b4690b3f8b 64 uint8_t dummy;
AnnaBridge 165:d1b4690b3f8b 65 };
AnnaBridge 165:d1b4690b3f8b 66 #endif
AnnaBridge 165:d1b4690b3f8b 67
AnnaBridge 172:65be27845400 68 #if DEVICE_TRNG
AnnaBridge 167:84c0a372a020 69 struct trng_s {
AnnaBridge 167:84c0a372a020 70 uint8_t dummy;
AnnaBridge 167:84c0a372a020 71 };
AnnaBridge 167:84c0a372a020 72 #endif
AnnaBridge 167:84c0a372a020 73
AnnaBridge 172:65be27845400 74 #if DEVICE_QSPI
AnnaBridge 172:65be27845400 75 struct qspi_s {
AnnaBridge 172:65be27845400 76 uint32_t instance;
AnnaBridge 172:65be27845400 77 };
AnnaBridge 172:65be27845400 78 #endif
AnnaBridge 172:65be27845400 79
Kojto 148:fd96258d940d 80 #include "gpio_object.h"
Kojto 148:fd96258d940d 81
Kojto 148:fd96258d940d 82 #ifdef __cplusplus
Kojto 148:fd96258d940d 83 }
Kojto 148:fd96258d940d 84 #endif
Kojto 148:fd96258d940d 85
Kojto 148:fd96258d940d 86 #endif