PageRenderTime 40ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

/libraries/FreeRTOS/utility/mpu_wrappers.h

http://github.com/leaflabs/libmaple
C Header | 141 lines | 58 code | 17 blank | 66 comment | 0 complexity | 635d6ce6ef8fab245e049392eb36e145 MD5 | raw file
Possible License(s): MIT
  1. /*
  2. FreeRTOS V7.0.1 - Copyright (C) 2011 Real Time Engineers Ltd.
  3. FreeRTOS supports many tools and architectures. V7.0.0 is sponsored by:
  4. Atollic AB - Atollic provides professional embedded systems development
  5. tools for C/C++ development, code analysis and test automation.
  6. See http://www.atollic.com
  7. ***************************************************************************
  8. * *
  9. * FreeRTOS tutorial books are available in pdf and paperback. *
  10. * Complete, revised, and edited pdf reference manuals are also *
  11. * available. *
  12. * *
  13. * Purchasing FreeRTOS documentation will not only help you, by *
  14. * ensuring you get running as quickly as possible and with an *
  15. * in-depth knowledge of how to use FreeRTOS, it will also help *
  16. * the FreeRTOS project to continue with its mission of providing *
  17. * professional grade, cross platform, de facto standard solutions *
  18. * for microcontrollers - completely free of charge! *
  19. * *
  20. * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
  21. * *
  22. * Thank you for using FreeRTOS, and thank you for your support! *
  23. * *
  24. ***************************************************************************
  25. This file is part of the FreeRTOS distribution.
  26. FreeRTOS is free software; you can redistribute it and/or modify it under
  27. the terms of the GNU General Public License (version 2) as published by the
  28. Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
  29. >>>NOTE<<< The modification to the GPL is included to allow you to
  30. distribute a combined work that includes FreeRTOS without being obliged to
  31. provide the source code for proprietary components outside of the FreeRTOS
  32. kernel. FreeRTOS is distributed in the hope that it will be useful, but
  33. WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  34. or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  35. more details. You should have received a copy of the GNU General Public
  36. License and the FreeRTOS license exception along with FreeRTOS; if not it
  37. can be viewed here: http://www.freertos.org/a00114.html and also obtained
  38. by writing to Richard Barry, contact details for whom are available on the
  39. FreeRTOS WEB site.
  40. 1 tab == 4 spaces!
  41. http://www.FreeRTOS.org - Documentation, latest information, license and
  42. contact details.
  43. http://www.SafeRTOS.com - A version that is certified for use in safety
  44. critical systems.
  45. http://www.OpenRTOS.com - Commercial support, development, porting,
  46. licensing and training services.
  47. */
  48. #ifndef MPU_WRAPPERS_H
  49. #define MPU_WRAPPERS_H
  50. /* This file redefines API functions to be called through a wrapper macro, but
  51. only for ports that are using the MPU. */
  52. #ifdef portUSING_MPU_WRAPPERS
  53. /* MPU_WRAPPERS_INCLUDED_FROM_API_FILE will be defined when this file is
  54. included from queue.c or task.c to prevent it from having an effect within
  55. those files. */
  56. #ifndef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
  57. #define xTaskGenericCreate MPU_xTaskGenericCreate
  58. #define vTaskAllocateMPURegions MPU_vTaskAllocateMPURegions
  59. #define vTaskDelete MPU_vTaskDelete
  60. #define vTaskDelayUntil MPU_vTaskDelayUntil
  61. #define vTaskDelay MPU_vTaskDelay
  62. #define uxTaskPriorityGet MPU_uxTaskPriorityGet
  63. #define vTaskPrioritySet MPU_vTaskPrioritySet
  64. #define vTaskSuspend MPU_vTaskSuspend
  65. #define xTaskIsTaskSuspended MPU_xTaskIsTaskSuspended
  66. #define vTaskResume MPU_vTaskResume
  67. #define vTaskSuspendAll MPU_vTaskSuspendAll
  68. #define xTaskResumeAll MPU_xTaskResumeAll
  69. #define xTaskGetTickCount MPU_xTaskGetTickCount
  70. #define uxTaskGetNumberOfTasks MPU_uxTaskGetNumberOfTasks
  71. #define vTaskList MPU_vTaskList
  72. #define vTaskGetRunTimeStats MPU_vTaskGetRunTimeStats
  73. #define vTaskStartTrace MPU_vTaskStartTrace
  74. #define ulTaskEndTrace MPU_ulTaskEndTrace
  75. #define vTaskSetApplicationTaskTag MPU_vTaskSetApplicationTaskTag
  76. #define xTaskGetApplicationTaskTag MPU_xTaskGetApplicationTaskTag
  77. #define xTaskCallApplicationTaskHook MPU_xTaskCallApplicationTaskHook
  78. #define uxTaskGetStackHighWaterMark MPU_uxTaskGetStackHighWaterMark
  79. #define xTaskGetCurrentTaskHandle MPU_xTaskGetCurrentTaskHandle
  80. #define xTaskGetSchedulerState MPU_xTaskGetSchedulerState
  81. #define xQueueCreate MPU_xQueueCreate
  82. #define xQueueCreateMutex MPU_xQueueCreateMutex
  83. #define xQueueGiveMutexRecursive MPU_xQueueGiveMutexRecursive
  84. #define xQueueTakeMutexRecursive MPU_xQueueTakeMutexRecursive
  85. #define xQueueCreateCountingSemaphore MPU_xQueueCreateCountingSemaphore
  86. #define xQueueGenericSend MPU_xQueueGenericSend
  87. #define xQueueAltGenericSend MPU_xQueueAltGenericSend
  88. #define xQueueAltGenericReceive MPU_xQueueAltGenericReceive
  89. #define xQueueGenericReceive MPU_xQueueGenericReceive
  90. #define uxQueueMessagesWaiting MPU_uxQueueMessagesWaiting
  91. #define vQueueDelete MPU_vQueueDelete
  92. #define pvPortMalloc MPU_pvPortMalloc
  93. #define vPortFree MPU_vPortFree
  94. #define xPortGetFreeHeapSize MPU_xPortGetFreeHeapSize
  95. #define vPortInitialiseBlocks MPU_vPortInitialiseBlocks
  96. #if configQUEUE_REGISTRY_SIZE > 0
  97. #define vQueueAddToRegistry MPU_vQueueAddToRegistry
  98. #define vQueueUnregisterQueue MPU_vQueueUnregisterQueue
  99. #endif
  100. /* Remove the privileged function macro. */
  101. #define PRIVILEGED_FUNCTION
  102. #else /* MPU_WRAPPERS_INCLUDED_FROM_API_FILE */
  103. /* Ensure API functions go in the privileged execution section. */
  104. #define PRIVILEGED_FUNCTION __attribute__((section("privileged_functions")))
  105. #define PRIVILEGED_DATA __attribute__((section("privileged_data")))
  106. //#define PRIVILEGED_DATA
  107. #endif /* MPU_WRAPPERS_INCLUDED_FROM_API_FILE */
  108. #else /* portUSING_MPU_WRAPPERS */
  109. #define PRIVILEGED_FUNCTION
  110. #define PRIVILEGED_DATA
  111. #define portUSING_MPU_WRAPPERS 0
  112. #endif /* portUSING_MPU_WRAPPERS */
  113. #endif /* MPU_WRAPPERS_H */