00

Committer:
ganlikun
Date:
Sun Jun 12 14:02:44 2022 +0000
Revision:
0:13413ea9a877
00

Who changed what in which revision?

UserRevisionLine numberNew contents of line
ganlikun 0:13413ea9a877 1 /* mbed Microcontroller Library
ganlikun 0:13413ea9a877 2 * Copyright (c) 2006-2013 ARM Limited
ganlikun 0:13413ea9a877 3 *
ganlikun 0:13413ea9a877 4 * Licensed under the Apache License, Version 2.0 (the "License");
ganlikun 0:13413ea9a877 5 * you may not use this file except in compliance with the License.
ganlikun 0:13413ea9a877 6 * You may obtain a copy of the License at
ganlikun 0:13413ea9a877 7 *
ganlikun 0:13413ea9a877 8 * http://www.apache.org/licenses/LICENSE-2.0
ganlikun 0:13413ea9a877 9 *
ganlikun 0:13413ea9a877 10 * Unless required by applicable law or agreed to in writing, software
ganlikun 0:13413ea9a877 11 * distributed under the License is distributed on an "AS IS" BASIS,
ganlikun 0:13413ea9a877 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
ganlikun 0:13413ea9a877 13 * See the License for the specific language governing permissions and
ganlikun 0:13413ea9a877 14 * limitations under the License.
ganlikun 0:13413ea9a877 15 */
ganlikun 0:13413ea9a877 16 #ifndef MBED_H
ganlikun 0:13413ea9a877 17 #define MBED_H
ganlikun 0:13413ea9a877 18
ganlikun 0:13413ea9a877 19 #define MBED_LIBRARY_VERSION 153
ganlikun 0:13413ea9a877 20
ganlikun 0:13413ea9a877 21 #if MBED_CONF_RTOS_PRESENT
ganlikun 0:13413ea9a877 22 // RTOS present, this is valid only for mbed OS 5
ganlikun 0:13413ea9a877 23 #define MBED_MAJOR_VERSION 5
ganlikun 0:13413ea9a877 24 #define MBED_MINOR_VERSION 6
ganlikun 0:13413ea9a877 25 #define MBED_PATCH_VERSION 2
ganlikun 0:13413ea9a877 26
ganlikun 0:13413ea9a877 27 #else
ganlikun 0:13413ea9a877 28 // mbed 2
ganlikun 0:13413ea9a877 29 #define MBED_MAJOR_VERSION 2
ganlikun 0:13413ea9a877 30 #define MBED_MINOR_VERSION 0
ganlikun 0:13413ea9a877 31 #define MBED_PATCH_VERSION MBED_LIBRARY_VERSION
ganlikun 0:13413ea9a877 32 #endif
ganlikun 0:13413ea9a877 33
ganlikun 0:13413ea9a877 34 #define MBED_ENCODE_VERSION(major, minor, patch) ((major)*10000 + (minor)*100 + (patch))
ganlikun 0:13413ea9a877 35 #define MBED_VERSION MBED_ENCODE_VERSION(MBED_MAJOR_VERSION, MBED_MINOR_VERSION, MBED_PATCH_VERSION)
ganlikun 0:13413ea9a877 36
ganlikun 0:13413ea9a877 37 #if MBED_CONF_RTOS_PRESENT
ganlikun 0:13413ea9a877 38 #include "rtos/rtos.h"
ganlikun 0:13413ea9a877 39 #endif
ganlikun 0:13413ea9a877 40
ganlikun 0:13413ea9a877 41 #if MBED_CONF_NSAPI_PRESENT
ganlikun 0:13413ea9a877 42 #include "netsocket/nsapi.h"
ganlikun 0:13413ea9a877 43 #include "netsocket/nsapi_ppp.h"
ganlikun 0:13413ea9a877 44 #endif
ganlikun 0:13413ea9a877 45
ganlikun 0:13413ea9a877 46 #if MBED_CONF_EVENTS_PRESENT
ganlikun 0:13413ea9a877 47 #include "events/mbed_events.h"
ganlikun 0:13413ea9a877 48 #endif
ganlikun 0:13413ea9a877 49
ganlikun 0:13413ea9a877 50 #if MBED_CONF_FILESYSTEM_PRESENT
ganlikun 0:13413ea9a877 51 #include "filesystem/mbed_filesystem.h"
ganlikun 0:13413ea9a877 52 #endif
ganlikun 0:13413ea9a877 53
ganlikun 0:13413ea9a877 54 #include "platform/mbed_toolchain.h"
ganlikun 0:13413ea9a877 55 #include "platform/platform.h"
ganlikun 0:13413ea9a877 56 #include "platform/mbed_application.h"
ganlikun 0:13413ea9a877 57
ganlikun 0:13413ea9a877 58 // Useful C libraries
ganlikun 0:13413ea9a877 59 #include <math.h>
ganlikun 0:13413ea9a877 60 #include <time.h>
ganlikun 0:13413ea9a877 61
ganlikun 0:13413ea9a877 62 // mbed Debug libraries
ganlikun 0:13413ea9a877 63 #include "platform/mbed_error.h"
ganlikun 0:13413ea9a877 64 #include "platform/mbed_interface.h"
ganlikun 0:13413ea9a877 65 #include "platform/mbed_assert.h"
ganlikun 0:13413ea9a877 66 #include "platform/mbed_debug.h"
ganlikun 0:13413ea9a877 67
ganlikun 0:13413ea9a877 68 // mbed Peripheral components
ganlikun 0:13413ea9a877 69 #include "drivers/DigitalIn.h"
ganlikun 0:13413ea9a877 70 #include "drivers/DigitalOut.h"
ganlikun 0:13413ea9a877 71 #include "drivers/DigitalInOut.h"
ganlikun 0:13413ea9a877 72 #include "drivers/BusIn.h"
ganlikun 0:13413ea9a877 73 #include "drivers/BusOut.h"
ganlikun 0:13413ea9a877 74 #include "drivers/BusInOut.h"
ganlikun 0:13413ea9a877 75 #include "drivers/PortIn.h"
ganlikun 0:13413ea9a877 76 #include "drivers/PortInOut.h"
ganlikun 0:13413ea9a877 77 #include "drivers/PortOut.h"
ganlikun 0:13413ea9a877 78 #include "drivers/AnalogIn.h"
ganlikun 0:13413ea9a877 79 #include "drivers/AnalogOut.h"
ganlikun 0:13413ea9a877 80 #include "drivers/PwmOut.h"
ganlikun 0:13413ea9a877 81 #include "drivers/Serial.h"
ganlikun 0:13413ea9a877 82 #include "drivers/SPI.h"
ganlikun 0:13413ea9a877 83 #include "drivers/SPISlave.h"
ganlikun 0:13413ea9a877 84 #include "drivers/I2C.h"
ganlikun 0:13413ea9a877 85 #include "drivers/I2CSlave.h"
ganlikun 0:13413ea9a877 86 #include "drivers/Ethernet.h"
ganlikun 0:13413ea9a877 87 #include "drivers/CAN.h"
ganlikun 0:13413ea9a877 88 #include "drivers/RawSerial.h"
ganlikun 0:13413ea9a877 89 #include "drivers/UARTSerial.h"
ganlikun 0:13413ea9a877 90 #include "drivers/FlashIAP.h"
ganlikun 0:13413ea9a877 91
ganlikun 0:13413ea9a877 92 // mbed Internal components
ganlikun 0:13413ea9a877 93 #include "drivers/Timer.h"
ganlikun 0:13413ea9a877 94 #include "drivers/Ticker.h"
ganlikun 0:13413ea9a877 95 #include "drivers/Timeout.h"
ganlikun 0:13413ea9a877 96 #include "drivers/LowPowerTimeout.h"
ganlikun 0:13413ea9a877 97 #include "drivers/LowPowerTicker.h"
ganlikun 0:13413ea9a877 98 #include "drivers/LowPowerTimer.h"
ganlikun 0:13413ea9a877 99 #include "platform/LocalFileSystem.h"
ganlikun 0:13413ea9a877 100 #include "drivers/InterruptIn.h"
ganlikun 0:13413ea9a877 101 #include "platform/mbed_wait_api.h"
ganlikun 0:13413ea9a877 102 #include "hal/sleep_api.h"
ganlikun 0:13413ea9a877 103 #include "platform/mbed_sleep.h"
ganlikun 0:13413ea9a877 104 #include "platform/mbed_rtc_time.h"
ganlikun 0:13413ea9a877 105 #include "platform/mbed_poll.h"
ganlikun 0:13413ea9a877 106 #include "platform/ATCmdParser.h"
ganlikun 0:13413ea9a877 107 #include "platform/FileSystemHandle.h"
ganlikun 0:13413ea9a877 108 #include "platform/FileHandle.h"
ganlikun 0:13413ea9a877 109 #include "platform/DirHandle.h"
ganlikun 0:13413ea9a877 110 #include "platform/CriticalSectionLock.h"
ganlikun 0:13413ea9a877 111 #include "platform/DeepSleepLock.h"
ganlikun 0:13413ea9a877 112
ganlikun 0:13413ea9a877 113 // mbed Non-hardware components
ganlikun 0:13413ea9a877 114 #include "platform/Callback.h"
ganlikun 0:13413ea9a877 115 #include "platform/FunctionPointer.h"
ganlikun 0:13413ea9a877 116
ganlikun 0:13413ea9a877 117 using namespace mbed;
ganlikun 0:13413ea9a877 118 using namespace std;
ganlikun 0:13413ea9a877 119
ganlikun 0:13413ea9a877 120 #endif