Committer:
abe5b02d-a2d4-4fe9-818e-c4e57c809ea4
Date:
Tue Jun 14 09:21:18 2022 +0000
Revision:
0:bdf663c61a82
lib

Who changed what in which revision?

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