https://www.freertos.org/vTaskAllocateMPURegions.htmlvTaskAllocateMPURegions[
FreeRTOS-MPU Specific]
task. h
void vTaskAllocateMPURegions(
TaskHandle_t xTaskToModify,
const MemoryRegion_t * const xRegions );Memory regions ถูกกำหนดให้กับ a restricted task เมื่อ the task ถูกสร้างโดยใช้การเรียก xTaskCreateRestricted(). The regions ดังนั้นสามารถถูกแก้ไขหรือกำหนดใหม่ ณ เวลารันโดยใช้ vTaskAllocateMPURegions().
vTaskAllocateMPURegions() ถูกมุ่งหมายสำหรับใช้กับ FreeRTOS-MPU, the demo applications ซึ่งบรรจุตัวอย่างของ vTaskAllocateMPURegions() ที่กำลังถูกใช้.
Parameters: xTask The handle of the task ที่กำลังถูกอัฟเดต.
xRegions ตัวชี้ไปยัง an array of MemoryRegion_t structures, ซึ่งแต่ละตัวบรรจุ a single new memory region
definitions. The array ควรถูกกำหนดขนาดโดยใช้ the constant
portNUM_CONFIGURABLE_REGIONS, ซึ่งบน the ARM Cortex-M3 ถูกเซ็ตเป็น 3.