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.
platform/mbed_application.h@169:a7c7b631e539, 2018-06-22 (annotated)
- Committer:
- Anna Bridge
- Date:
- Fri Jun 22 15:38:59 2018 +0100
- Revision:
- 169:a7c7b631e539
- Parent:
- 158:1c57384330a6
- Child:
- 170:e95d10626187
mbed library. Release version 162
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
AnnaBridge | 156:ff21514d8981 | 1 | /* mbed Microcontroller Library |
AnnaBridge | 156:ff21514d8981 | 2 | * Copyright (c) 2017-2017 ARM Limited |
AnnaBridge | 156:ff21514d8981 | 3 | * |
AnnaBridge | 156:ff21514d8981 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
AnnaBridge | 156:ff21514d8981 | 5 | * you may not use this file except in compliance with the License. |
AnnaBridge | 156:ff21514d8981 | 6 | * You may obtain a copy of the License at |
AnnaBridge | 156:ff21514d8981 | 7 | * |
AnnaBridge | 156:ff21514d8981 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
AnnaBridge | 156:ff21514d8981 | 9 | * |
AnnaBridge | 156:ff21514d8981 | 10 | * Unless required by applicable law or agreed to in writing, software |
AnnaBridge | 156:ff21514d8981 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
AnnaBridge | 156:ff21514d8981 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
AnnaBridge | 156:ff21514d8981 | 13 | * See the License for the specific language governing permissions and |
AnnaBridge | 156:ff21514d8981 | 14 | * limitations under the License. |
AnnaBridge | 156:ff21514d8981 | 15 | */ |
AnnaBridge | 158:1c57384330a6 | 16 | |
AnnaBridge | 156:ff21514d8981 | 17 | #ifndef MBED_APPLICATION_H |
AnnaBridge | 156:ff21514d8981 | 18 | #define MBED_APPLICATION_H |
AnnaBridge | 156:ff21514d8981 | 19 | |
AnnaBridge | 156:ff21514d8981 | 20 | #include<stdint.h> |
AnnaBridge | 156:ff21514d8981 | 21 | |
Anna Bridge |
169:a7c7b631e539 | 22 | #if defined(__CORTEX_M3) || defined(__CORTEX_M4) || defined(__CORTEX_M7)\ |
Anna Bridge |
169:a7c7b631e539 | 23 | || defined(__CORTEX_M23) |
AnnaBridge | 156:ff21514d8981 | 24 | #define MBED_APPLICATION_SUPPORT 1 |
AnnaBridge | 156:ff21514d8981 | 25 | #else |
AnnaBridge | 156:ff21514d8981 | 26 | #define MBED_APPLICATION_SUPPORT 0 |
AnnaBridge | 156:ff21514d8981 | 27 | #endif |
AnnaBridge | 156:ff21514d8981 | 28 | |
AnnaBridge | 156:ff21514d8981 | 29 | #if MBED_APPLICATION_SUPPORT |
AnnaBridge | 156:ff21514d8981 | 30 | #ifdef __cplusplus |
AnnaBridge | 156:ff21514d8981 | 31 | extern "C" { |
AnnaBridge | 156:ff21514d8981 | 32 | #endif |
AnnaBridge | 156:ff21514d8981 | 33 | |
AnnaBridge | 156:ff21514d8981 | 34 | /** |
AnnaBridge | 156:ff21514d8981 | 35 | * Start the application at the given address. This function does |
AnnaBridge | 156:ff21514d8981 | 36 | * not return. It is the applications responsibility for flushing to |
AnnaBridge | 156:ff21514d8981 | 37 | * or powering down external components such as filesystems or |
AnnaBridge | 156:ff21514d8981 | 38 | * socket connections before calling this function. For Cortex-M |
AnnaBridge | 156:ff21514d8981 | 39 | * devices this function powers down generic system components such as |
AnnaBridge | 156:ff21514d8981 | 40 | * the NVIC and set the vector table to that of the new image followed |
AnnaBridge | 156:ff21514d8981 | 41 | * by jumping to the reset handler of the new image. |
AnnaBridge | 156:ff21514d8981 | 42 | * |
AnnaBridge | 156:ff21514d8981 | 43 | * @param address Starting address of next application to run |
AnnaBridge | 156:ff21514d8981 | 44 | */ |
AnnaBridge | 156:ff21514d8981 | 45 | void mbed_start_application(uintptr_t address); |
AnnaBridge | 156:ff21514d8981 | 46 | |
AnnaBridge | 156:ff21514d8981 | 47 | #ifdef __cplusplus |
AnnaBridge | 156:ff21514d8981 | 48 | } |
AnnaBridge | 156:ff21514d8981 | 49 | #endif |
AnnaBridge | 156:ff21514d8981 | 50 | #endif |
AnnaBridge | 156:ff21514d8981 | 51 | |
AnnaBridge | 156:ff21514d8981 | 52 | #endif |
AnnaBridge | 156:ff21514d8981 | 53 |