mbed_application.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* mbed Microcontroller Library
  2. * Copyright (c) 2017-2017 ARM Limited
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #ifndef MBED_APPLICATION_H
  17. #define MBED_APPLICATION_H
  18. #include<stdint.h>
  19. #if defined(__CORTEX_M3) || defined(__CORTEX_M4) || defined(__CORTEX_M7)\
  20. || defined(__CORTEX_M23) || defined(__CORTEX_A9)
  21. #define MBED_APPLICATION_SUPPORT 1
  22. #else
  23. #define MBED_APPLICATION_SUPPORT 0
  24. #endif
  25. #if MBED_APPLICATION_SUPPORT
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif
  29. /**
  30. * Start the application at the given address. This function does
  31. * not return. It is the applications responsibility for flushing to
  32. * or powering down external components such as filesystems or
  33. * socket connections before calling this function. For Cortex-M
  34. * devices this function powers down generic system components such as
  35. * the NVIC and set the vector table to that of the new image followed
  36. * by jumping to the reset handler of the new image.
  37. *
  38. * @param address Starting address of next application to run
  39. */
  40. void mbed_start_application(uintptr_t address);
  41. #ifdef __cplusplus
  42. }
  43. #endif
  44. #endif
  45. #endif