USB Serial application
Fork of USBSerial_HelloWorld by
mbed-dev/mbed.h@10:41552d038a69, 2017-01-10 (annotated)
- Committer:
- Zaitsev
- Date:
- Tue Jan 10 20:42:26 2017 +0000
- Revision:
- 10:41552d038a69
USB Serial bi-directional bridge
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Zaitsev | 10:41552d038a69 | 1 | /* mbed Microcontroller Library |
Zaitsev | 10:41552d038a69 | 2 | * Copyright (c) 2006-2013 ARM Limited |
Zaitsev | 10:41552d038a69 | 3 | * |
Zaitsev | 10:41552d038a69 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
Zaitsev | 10:41552d038a69 | 5 | * you may not use this file except in compliance with the License. |
Zaitsev | 10:41552d038a69 | 6 | * You may obtain a copy of the License at |
Zaitsev | 10:41552d038a69 | 7 | * |
Zaitsev | 10:41552d038a69 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
Zaitsev | 10:41552d038a69 | 9 | * |
Zaitsev | 10:41552d038a69 | 10 | * Unless required by applicable law or agreed to in writing, software |
Zaitsev | 10:41552d038a69 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
Zaitsev | 10:41552d038a69 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
Zaitsev | 10:41552d038a69 | 13 | * See the License for the specific language governing permissions and |
Zaitsev | 10:41552d038a69 | 14 | * limitations under the License. |
Zaitsev | 10:41552d038a69 | 15 | */ |
Zaitsev | 10:41552d038a69 | 16 | #ifndef MBED_H |
Zaitsev | 10:41552d038a69 | 17 | #define MBED_H |
Zaitsev | 10:41552d038a69 | 18 | |
Zaitsev | 10:41552d038a69 | 19 | #define MBED_LIBRARY_VERSION 133 |
Zaitsev | 10:41552d038a69 | 20 | |
Zaitsev | 10:41552d038a69 | 21 | #if MBED_CONF_RTOS_PRESENT |
Zaitsev | 10:41552d038a69 | 22 | // RTOS present, this is valid only for mbed OS 5 |
Zaitsev | 10:41552d038a69 | 23 | #define MBED_MAJOR_VERSION 5 |
Zaitsev | 10:41552d038a69 | 24 | #define MBED_MINOR_VERSION 3 |
Zaitsev | 10:41552d038a69 | 25 | #define MBED_PATCH_VERSION 2 |
Zaitsev | 10:41552d038a69 | 26 | |
Zaitsev | 10:41552d038a69 | 27 | #else |
Zaitsev | 10:41552d038a69 | 28 | // mbed 2 |
Zaitsev | 10:41552d038a69 | 29 | #define MBED_MAJOR_VERSION 2 |
Zaitsev | 10:41552d038a69 | 30 | #define MBED_MINOR_VERSION 0 |
Zaitsev | 10:41552d038a69 | 31 | #define MBED_PATCH_VERSION MBED_LIBRARY_VERSION |
Zaitsev | 10:41552d038a69 | 32 | #endif |
Zaitsev | 10:41552d038a69 | 33 | |
Zaitsev | 10:41552d038a69 | 34 | #define MBED_ENCODE_VERSION(major, minor, patch) ((major)*10000 + (minor)*100 + (patch)) |
Zaitsev | 10:41552d038a69 | 35 | |
Zaitsev | 10:41552d038a69 | 36 | #define MBED_VERSION MBED_ENCODE_VERSION(MBED_MAJOR_VERSION, MBED_MINOR_VERSION, MBED_PATCH_VERSION) |
Zaitsev | 10:41552d038a69 | 37 | |
Zaitsev | 10:41552d038a69 | 38 | #if MBED_CONF_RTOS_PRESENT |
Zaitsev | 10:41552d038a69 | 39 | #include "rtos/rtos.h" |
Zaitsev | 10:41552d038a69 | 40 | #endif |
Zaitsev | 10:41552d038a69 | 41 | |
Zaitsev | 10:41552d038a69 | 42 | #if MBED_CONF_NSAPI_PRESENT |
Zaitsev | 10:41552d038a69 | 43 | #include "netsocket/nsapi.h" |
Zaitsev | 10:41552d038a69 | 44 | #endif |
Zaitsev | 10:41552d038a69 | 45 | |
Zaitsev | 10:41552d038a69 | 46 | #if MBED_CONF_EVENTS_PRESENT |
Zaitsev | 10:41552d038a69 | 47 | #include "events/mbed_events.h" |
Zaitsev | 10:41552d038a69 | 48 | #endif |
Zaitsev | 10:41552d038a69 | 49 | |
Zaitsev | 10:41552d038a69 | 50 | #include "platform/toolchain.h" |
Zaitsev | 10:41552d038a69 | 51 | #include "platform/platform.h" |
Zaitsev | 10:41552d038a69 | 52 | |
Zaitsev | 10:41552d038a69 | 53 | // Useful C libraries |
Zaitsev | 10:41552d038a69 | 54 | #include <math.h> |
Zaitsev | 10:41552d038a69 | 55 | #include <time.h> |
Zaitsev | 10:41552d038a69 | 56 | |
Zaitsev | 10:41552d038a69 | 57 | // mbed Debug libraries |
Zaitsev | 10:41552d038a69 | 58 | #include "platform/mbed_error.h" |
Zaitsev | 10:41552d038a69 | 59 | #include "platform/mbed_interface.h" |
Zaitsev | 10:41552d038a69 | 60 | #include "platform/mbed_assert.h" |
Zaitsev | 10:41552d038a69 | 61 | |
Zaitsev | 10:41552d038a69 | 62 | // mbed Peripheral components |
Zaitsev | 10:41552d038a69 | 63 | #include "drivers/DigitalIn.h" |
Zaitsev | 10:41552d038a69 | 64 | #include "drivers/DigitalOut.h" |
Zaitsev | 10:41552d038a69 | 65 | #include "drivers/DigitalInOut.h" |
Zaitsev | 10:41552d038a69 | 66 | #include "drivers/BusIn.h" |
Zaitsev | 10:41552d038a69 | 67 | #include "drivers/BusOut.h" |
Zaitsev | 10:41552d038a69 | 68 | #include "drivers/BusInOut.h" |
Zaitsev | 10:41552d038a69 | 69 | #include "drivers/PortIn.h" |
Zaitsev | 10:41552d038a69 | 70 | #include "drivers/PortInOut.h" |
Zaitsev | 10:41552d038a69 | 71 | #include "drivers/PortOut.h" |
Zaitsev | 10:41552d038a69 | 72 | #include "drivers/AnalogIn.h" |
Zaitsev | 10:41552d038a69 | 73 | #include "drivers/AnalogOut.h" |
Zaitsev | 10:41552d038a69 | 74 | #include "drivers/PwmOut.h" |
Zaitsev | 10:41552d038a69 | 75 | #include "drivers/Serial.h" |
Zaitsev | 10:41552d038a69 | 76 | #include "drivers/SPI.h" |
Zaitsev | 10:41552d038a69 | 77 | #include "drivers/SPISlave.h" |
Zaitsev | 10:41552d038a69 | 78 | #include "drivers/I2C.h" |
Zaitsev | 10:41552d038a69 | 79 | #include "drivers/I2CSlave.h" |
Zaitsev | 10:41552d038a69 | 80 | #include "drivers/Ethernet.h" |
Zaitsev | 10:41552d038a69 | 81 | #include "drivers/CAN.h" |
Zaitsev | 10:41552d038a69 | 82 | #include "drivers/RawSerial.h" |
Zaitsev | 10:41552d038a69 | 83 | |
Zaitsev | 10:41552d038a69 | 84 | // mbed Internal components |
Zaitsev | 10:41552d038a69 | 85 | #include "drivers/Timer.h" |
Zaitsev | 10:41552d038a69 | 86 | #include "drivers/Ticker.h" |
Zaitsev | 10:41552d038a69 | 87 | #include "drivers/Timeout.h" |
Zaitsev | 10:41552d038a69 | 88 | #include "drivers/LowPowerTimeout.h" |
Zaitsev | 10:41552d038a69 | 89 | #include "drivers/LowPowerTicker.h" |
Zaitsev | 10:41552d038a69 | 90 | #include "drivers/LowPowerTimer.h" |
Zaitsev | 10:41552d038a69 | 91 | #include "drivers/LocalFileSystem.h" |
Zaitsev | 10:41552d038a69 | 92 | #include "drivers/InterruptIn.h" |
Zaitsev | 10:41552d038a69 | 93 | #include "platform/wait_api.h" |
Zaitsev | 10:41552d038a69 | 94 | #include "hal/sleep_api.h" |
Zaitsev | 10:41552d038a69 | 95 | #include "platform/rtc_time.h" |
Zaitsev | 10:41552d038a69 | 96 | |
Zaitsev | 10:41552d038a69 | 97 | // mbed Non-hardware components |
Zaitsev | 10:41552d038a69 | 98 | #include "platform/Callback.h" |
Zaitsev | 10:41552d038a69 | 99 | #include "platform/FunctionPointer.h" |
Zaitsev | 10:41552d038a69 | 100 | |
Zaitsev | 10:41552d038a69 | 101 | using namespace mbed; |
Zaitsev | 10:41552d038a69 | 102 | using namespace std; |
Zaitsev | 10:41552d038a69 | 103 | |
Zaitsev | 10:41552d038a69 | 104 | #endif |