From Ben Katz mbed-dev library. Removed unnecessary target files to reduce the overall size by a factor of 10 to make it easier to import into the online IDE.
Dependents: motor_driver motor_driver_screaming_fix
platform/mbed_application.h@0:083111ae2a11, 2020-11-26 (annotated)
- Committer:
- saloutos
- Date:
- Thu Nov 26 04:08:56 2020 +0000
- Revision:
- 0:083111ae2a11
first commit of leaned mbed dev lib
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
saloutos | 0:083111ae2a11 | 1 | |
saloutos | 0:083111ae2a11 | 2 | /** \addtogroup platform */ |
saloutos | 0:083111ae2a11 | 3 | /** @{*/ |
saloutos | 0:083111ae2a11 | 4 | /* mbed Microcontroller Library |
saloutos | 0:083111ae2a11 | 5 | * Copyright (c) 2017-2017 ARM Limited |
saloutos | 0:083111ae2a11 | 6 | * |
saloutos | 0:083111ae2a11 | 7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
saloutos | 0:083111ae2a11 | 8 | * you may not use this file except in compliance with the License. |
saloutos | 0:083111ae2a11 | 9 | * You may obtain a copy of the License at |
saloutos | 0:083111ae2a11 | 10 | * |
saloutos | 0:083111ae2a11 | 11 | * http://www.apache.org/licenses/LICENSE-2.0 |
saloutos | 0:083111ae2a11 | 12 | * |
saloutos | 0:083111ae2a11 | 13 | * Unless required by applicable law or agreed to in writing, software |
saloutos | 0:083111ae2a11 | 14 | * distributed under the License is distributed on an "AS IS" BASIS, |
saloutos | 0:083111ae2a11 | 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
saloutos | 0:083111ae2a11 | 16 | * See the License for the specific language governing permissions and |
saloutos | 0:083111ae2a11 | 17 | * limitations under the License. |
saloutos | 0:083111ae2a11 | 18 | */ |
saloutos | 0:083111ae2a11 | 19 | #ifndef MBED_APPLICATION_H |
saloutos | 0:083111ae2a11 | 20 | #define MBED_APPLICATION_H |
saloutos | 0:083111ae2a11 | 21 | |
saloutos | 0:083111ae2a11 | 22 | #include<stdint.h> |
saloutos | 0:083111ae2a11 | 23 | |
saloutos | 0:083111ae2a11 | 24 | #if defined(__CORTEX_M3) || defined(__CORTEX_M4) || defined(__CORTEX_M7) |
saloutos | 0:083111ae2a11 | 25 | #define MBED_APPLICATION_SUPPORT 1 |
saloutos | 0:083111ae2a11 | 26 | #else |
saloutos | 0:083111ae2a11 | 27 | #define MBED_APPLICATION_SUPPORT 0 |
saloutos | 0:083111ae2a11 | 28 | #endif |
saloutos | 0:083111ae2a11 | 29 | |
saloutos | 0:083111ae2a11 | 30 | #if MBED_APPLICATION_SUPPORT |
saloutos | 0:083111ae2a11 | 31 | #ifdef __cplusplus |
saloutos | 0:083111ae2a11 | 32 | extern "C" { |
saloutos | 0:083111ae2a11 | 33 | #endif |
saloutos | 0:083111ae2a11 | 34 | |
saloutos | 0:083111ae2a11 | 35 | /** |
saloutos | 0:083111ae2a11 | 36 | * Start the application at the given address. This function does |
saloutos | 0:083111ae2a11 | 37 | * not return. It is the applications responsibility for flushing to |
saloutos | 0:083111ae2a11 | 38 | * or powering down external components such as filesystems or |
saloutos | 0:083111ae2a11 | 39 | * socket connections before calling this function. For Cortex-M |
saloutos | 0:083111ae2a11 | 40 | * devices this function powers down generic system components such as |
saloutos | 0:083111ae2a11 | 41 | * the NVIC and set the vector table to that of the new image followed |
saloutos | 0:083111ae2a11 | 42 | * by jumping to the reset handler of the new image. |
saloutos | 0:083111ae2a11 | 43 | * |
saloutos | 0:083111ae2a11 | 44 | * @param address Starting address of next application to run |
saloutos | 0:083111ae2a11 | 45 | */ |
saloutos | 0:083111ae2a11 | 46 | void mbed_start_application(uintptr_t address); |
saloutos | 0:083111ae2a11 | 47 | |
saloutos | 0:083111ae2a11 | 48 | #ifdef __cplusplus |
saloutos | 0:083111ae2a11 | 49 | } |
saloutos | 0:083111ae2a11 | 50 | #endif |
saloutos | 0:083111ae2a11 | 51 | #endif |
saloutos | 0:083111ae2a11 | 52 | |
saloutos | 0:083111ae2a11 | 53 | #endif |
saloutos | 0:083111ae2a11 | 54 | |
saloutos | 0:083111ae2a11 | 55 | /** @}*/ |