Rtos API example

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers mbed_application.h Source File

mbed_application.h

00001 /* mbed Microcontroller Library
00002  * Copyright (c) 2017-2017 ARM Limited
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef MBED_APPLICATION_H
00018 #define MBED_APPLICATION_H
00019 
00020 #include<stdint.h>
00021 
00022 #if defined(__CORTEX_M3) || defined(__CORTEX_M4) || defined(__CORTEX_M7)
00023 #define MBED_APPLICATION_SUPPORT 1
00024 #else
00025 #define MBED_APPLICATION_SUPPORT 0
00026 #endif
00027 
00028 #if MBED_APPLICATION_SUPPORT
00029 #ifdef __cplusplus
00030 extern "C" {
00031 #endif
00032 
00033 /**
00034  *  Start the application at the given address. This function does
00035  *  not return. It is the applications responsibility for flushing to
00036  *  or powering down external components such as filesystems or
00037  *  socket connections before calling this function. For Cortex-M
00038  *  devices this function powers down generic system components such as
00039  *  the NVIC and set the vector table to that of the new image followed
00040  *  by jumping to the reset handler of the new image.
00041  *
00042  *  @param address    Starting address of next application to run
00043  */
00044 void mbed_start_application(uintptr_t address);
00045 
00046 #ifdef __cplusplus
00047 }
00048 #endif
00049 #endif
00050 
00051 #endif
00052