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.
mbed.h@141:794e51388b66, 2017-04-28 (annotated)
- Committer:
- Anna Bridge
- Date:
- Fri Apr 28 13:09:19 2017 +0100
- Revision:
- 141:794e51388b66
- Parent:
- 140:97feb9bacc10
- Child:
- 142:4eea097334d6
Release 141 of the mbed library
Ports for Upcoming Targets
Fixes and Changes
4008: [NUC472/M453] Support Bootloader and FlashIAP https://github.com/ARMmbed/mbed-os/pull/4008
4102: Add SCL and SDA defs for I2C[0-2]; redefine I2C_[SCL,SDA] to I2C2 https://github.com/ARMmbed/mbed-os/pull/4102
4118: STM32F4 Internal ADC channels rework https://github.com/ARMmbed/mbed-os/pull/4118
4126: STM32F4 : remove SERIAL_TX and SERIAL_RX from available pins https://github.com/ARMmbed/mbed-os/pull/4126
4148: Revert "STM32F4 Internal ADC channels rework" https://github.com/ARMmbed/mbed-os/pull/4148
4152: STM32F4 Internal ADC channels rework https://github.com/ARMmbed/mbed-os/pull/4152
4074: [Silicon Labs] Update pinout https://github.com/ARMmbed/mbed-os/pull/4074
4133: U-BLOX_C030: Default XTAL is now 12MHz onboard. Option to use Debug 8MHz https://github.com/ARMmbed/mbed-os/pull/4133
4142: EFM32: Fixed `pwmout_all_inactive` being inversed https://github.com/ARMmbed/mbed-os/pull/4142
4016: [NRF5]: fix rtc overflow-while-set-timestamp issue https://github.com/ARMmbed/mbed-os/pull/4016
4031: STM32 increase IAR heap size for big RAM targets https://github.com/ARMmbed/mbed-os/pull/4031
4137: MCUXpresso: Update ARM linker files to eliminate reserving RAM for stack & heap https://github.com/ARMmbed/mbed-os/pull/4137
4176: STM32L4 Internal ADC channels rework https://github.com/ARMmbed/mbed-os/pull/4176
4154: STM32F7 Internal ADC channels rework https://github.com/ARMmbed/mbed-os/pull/4154
4174: [NRF52840]: fix rtc overflow-while-set-timestamp issue https://github.com/ARMmbed/mbed-os/pull/4174
4180: [UBLOX_C030] create target hierarchy for the specific versions of the C030 board https://github.com/ARMmbed/mbed-os/pull/4180
4153: STM32F2: Internal ADC channels rework https://github.com/ARMmbed/mbed-os/pull/4153
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bogdanm | 65:5798e58a58b1 | 1 | /* mbed Microcontroller Library |
bogdanm | 65:5798e58a58b1 | 2 | * Copyright (c) 2006-2013 ARM Limited |
bogdanm | 65:5798e58a58b1 | 3 | * |
bogdanm | 65:5798e58a58b1 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
bogdanm | 65:5798e58a58b1 | 5 | * you may not use this file except in compliance with the License. |
bogdanm | 65:5798e58a58b1 | 6 | * You may obtain a copy of the License at |
bogdanm | 65:5798e58a58b1 | 7 | * |
bogdanm | 65:5798e58a58b1 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
bogdanm | 65:5798e58a58b1 | 9 | * |
bogdanm | 65:5798e58a58b1 | 10 | * Unless required by applicable law or agreed to in writing, software |
bogdanm | 65:5798e58a58b1 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
bogdanm | 65:5798e58a58b1 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
bogdanm | 65:5798e58a58b1 | 13 | * See the License for the specific language governing permissions and |
bogdanm | 65:5798e58a58b1 | 14 | * limitations under the License. |
bogdanm | 65:5798e58a58b1 | 15 | */ |
bogdanm | 65:5798e58a58b1 | 16 | #ifndef MBED_H |
bogdanm | 65:5798e58a58b1 | 17 | #define MBED_H |
bogdanm | 65:5798e58a58b1 | 18 | |
Anna Bridge |
141:794e51388b66 | 19 | #define MBED_LIBRARY_VERSION 141 |
<> | 130:d75b3fe1f5cb | 20 | |
<> | 130:d75b3fe1f5cb | 21 | #if MBED_CONF_RTOS_PRESENT |
<> | 130:d75b3fe1f5cb | 22 | // RTOS present, this is valid only for mbed OS 5 |
<> | 130:d75b3fe1f5cb | 23 | #define MBED_MAJOR_VERSION 5 |
<> | 138:093f2bd7b9eb | 24 | #define MBED_MINOR_VERSION 4 |
Anna Bridge |
141:794e51388b66 | 25 | #define MBED_PATCH_VERSION 4 |
<> | 130:d75b3fe1f5cb | 26 | |
<> | 130:d75b3fe1f5cb | 27 | #else |
<> | 130:d75b3fe1f5cb | 28 | // mbed 2 |
<> | 130:d75b3fe1f5cb | 29 | #define MBED_MAJOR_VERSION 2 |
<> | 130:d75b3fe1f5cb | 30 | #define MBED_MINOR_VERSION 0 |
<> | 130:d75b3fe1f5cb | 31 | #define MBED_PATCH_VERSION MBED_LIBRARY_VERSION |
<> | 130:d75b3fe1f5cb | 32 | #endif |
<> | 130:d75b3fe1f5cb | 33 | |
<> | 130:d75b3fe1f5cb | 34 | #define MBED_ENCODE_VERSION(major, minor, patch) ((major)*10000 + (minor)*100 + (patch)) |
<> | 130:d75b3fe1f5cb | 35 | |
<> | 130:d75b3fe1f5cb | 36 | #define MBED_VERSION MBED_ENCODE_VERSION(MBED_MAJOR_VERSION, MBED_MINOR_VERSION, MBED_PATCH_VERSION) |
Kojto | 123:b0220dba8be7 | 37 | |
Kojto | 123:b0220dba8be7 | 38 | #if MBED_CONF_RTOS_PRESENT |
Kojto | 123:b0220dba8be7 | 39 | #include "rtos/rtos.h" |
Kojto | 123:b0220dba8be7 | 40 | #endif |
Kojto | 123:b0220dba8be7 | 41 | |
Kojto | 123:b0220dba8be7 | 42 | #if MBED_CONF_NSAPI_PRESENT |
<> | 128:9bcdf88f62b0 | 43 | #include "netsocket/nsapi.h" |
Kojto | 123:b0220dba8be7 | 44 | #endif |
bogdanm | 65:5798e58a58b1 | 45 | |
<> | 128:9bcdf88f62b0 | 46 | #if MBED_CONF_EVENTS_PRESENT |
<> | 128:9bcdf88f62b0 | 47 | #include "events/mbed_events.h" |
<> | 128:9bcdf88f62b0 | 48 | #endif |
<> | 128:9bcdf88f62b0 | 49 | |
<> | 138:093f2bd7b9eb | 50 | #if MBED_CONF_FILESYSTEM_PRESENT |
<> | 138:093f2bd7b9eb | 51 | #include "filesystem/mbed_filesystem.h" |
<> | 138:093f2bd7b9eb | 52 | #endif |
<> | 138:093f2bd7b9eb | 53 | |
<> | 138:093f2bd7b9eb | 54 | #include "platform/mbed_toolchain.h" |
<> | 128:9bcdf88f62b0 | 55 | #include "platform/platform.h" |
<> | 138:093f2bd7b9eb | 56 | #include "platform/mbed_application.h" |
bogdanm | 65:5798e58a58b1 | 57 | |
bogdanm | 65:5798e58a58b1 | 58 | // Useful C libraries |
bogdanm | 65:5798e58a58b1 | 59 | #include <math.h> |
bogdanm | 65:5798e58a58b1 | 60 | #include <time.h> |
bogdanm | 65:5798e58a58b1 | 61 | |
bogdanm | 65:5798e58a58b1 | 62 | // mbed Debug libraries |
<> | 128:9bcdf88f62b0 | 63 | #include "platform/mbed_error.h" |
<> | 128:9bcdf88f62b0 | 64 | #include "platform/mbed_interface.h" |
<> | 128:9bcdf88f62b0 | 65 | #include "platform/mbed_assert.h" |
bogdanm | 65:5798e58a58b1 | 66 | |
bogdanm | 65:5798e58a58b1 | 67 | // mbed Peripheral components |
<> | 128:9bcdf88f62b0 | 68 | #include "drivers/DigitalIn.h" |
<> | 128:9bcdf88f62b0 | 69 | #include "drivers/DigitalOut.h" |
<> | 128:9bcdf88f62b0 | 70 | #include "drivers/DigitalInOut.h" |
<> | 128:9bcdf88f62b0 | 71 | #include "drivers/BusIn.h" |
<> | 128:9bcdf88f62b0 | 72 | #include "drivers/BusOut.h" |
<> | 128:9bcdf88f62b0 | 73 | #include "drivers/BusInOut.h" |
<> | 128:9bcdf88f62b0 | 74 | #include "drivers/PortIn.h" |
<> | 128:9bcdf88f62b0 | 75 | #include "drivers/PortInOut.h" |
<> | 128:9bcdf88f62b0 | 76 | #include "drivers/PortOut.h" |
<> | 128:9bcdf88f62b0 | 77 | #include "drivers/AnalogIn.h" |
<> | 128:9bcdf88f62b0 | 78 | #include "drivers/AnalogOut.h" |
<> | 128:9bcdf88f62b0 | 79 | #include "drivers/PwmOut.h" |
<> | 128:9bcdf88f62b0 | 80 | #include "drivers/Serial.h" |
<> | 128:9bcdf88f62b0 | 81 | #include "drivers/SPI.h" |
<> | 128:9bcdf88f62b0 | 82 | #include "drivers/SPISlave.h" |
<> | 128:9bcdf88f62b0 | 83 | #include "drivers/I2C.h" |
<> | 128:9bcdf88f62b0 | 84 | #include "drivers/I2CSlave.h" |
<> | 128:9bcdf88f62b0 | 85 | #include "drivers/Ethernet.h" |
<> | 128:9bcdf88f62b0 | 86 | #include "drivers/CAN.h" |
<> | 128:9bcdf88f62b0 | 87 | #include "drivers/RawSerial.h" |
<> | 138:093f2bd7b9eb | 88 | #include "drivers/FlashIAP.h" |
bogdanm | 65:5798e58a58b1 | 89 | |
bogdanm | 65:5798e58a58b1 | 90 | // mbed Internal components |
<> | 128:9bcdf88f62b0 | 91 | #include "drivers/Timer.h" |
<> | 128:9bcdf88f62b0 | 92 | #include "drivers/Ticker.h" |
<> | 128:9bcdf88f62b0 | 93 | #include "drivers/Timeout.h" |
<> | 128:9bcdf88f62b0 | 94 | #include "drivers/LowPowerTimeout.h" |
<> | 128:9bcdf88f62b0 | 95 | #include "drivers/LowPowerTicker.h" |
<> | 128:9bcdf88f62b0 | 96 | #include "drivers/LowPowerTimer.h" |
<> | 128:9bcdf88f62b0 | 97 | #include "drivers/LocalFileSystem.h" |
<> | 128:9bcdf88f62b0 | 98 | #include "drivers/InterruptIn.h" |
<> | 138:093f2bd7b9eb | 99 | #include "platform/mbed_wait_api.h" |
<> | 128:9bcdf88f62b0 | 100 | #include "hal/sleep_api.h" |
<> | 138:093f2bd7b9eb | 101 | #include "platform/mbed_sleep.h" |
<> | 138:093f2bd7b9eb | 102 | #include "platform/mbed_rtc_time.h" |
bogdanm | 65:5798e58a58b1 | 103 | |
Kojto | 122:f9eeca106725 | 104 | // mbed Non-hardware components |
<> | 128:9bcdf88f62b0 | 105 | #include "platform/Callback.h" |
<> | 128:9bcdf88f62b0 | 106 | #include "platform/FunctionPointer.h" |
Kojto | 122:f9eeca106725 | 107 | |
bogdanm | 65:5798e58a58b1 | 108 | using namespace mbed; |
bogdanm | 65:5798e58a58b1 | 109 | using namespace std; |
bogdanm | 65:5798e58a58b1 | 110 | |
bogdanm | 65:5798e58a58b1 | 111 | #endif |