2 * FreeRTOS Kernel V10.0.0
\r
3 * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
\r
5 * Permission is hereby granted, free of charge, to any person obtaining a copy of
\r
6 * this software and associated documentation files (the "Software"), to deal in
\r
7 * the Software without restriction, including without limitation the rights to
\r
8 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
\r
9 * the Software, and to permit persons to whom the Software is furnished to do so,
\r
10 * subject to the following conditions:
\r
12 * The above copyright notice and this permission notice shall be included in all
\r
13 * copies or substantial portions of the Software. If you wish to use our Amazon
\r
14 * FreeRTOS name, please do so in a fair use way that does not cause confusion.
\r
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
\r
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
\r
18 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
\r
19 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
\r
20 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
\r
21 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\r
23 * http://www.FreeRTOS.org
\r
24 * http://aws.amazon.com/freertos
\r
26 * 1 tab == 4 spaces!
\r
33 /* Standard includes. */
\r
36 /* Constants denoting the available memory models. These are used within
\r
37 FreeRTOSConfig.h to set the configMEMMODEL value. */
\r
39 #define portMEDIUM 1
\r
40 #define portCOMPACT 2
\r
44 /*-----------------------------------------------------------
\r
45 * Port specific definitions.
\r
47 * The settings in this file configure FreeRTOS correctly for the
\r
48 * given hardware and compiler.
\r
50 * These settings should not be altered.
\r
51 *-----------------------------------------------------------
\r
54 /* Type definitions. */
\r
55 #define portCHAR char
\r
56 #define portFLOAT float
\r
57 #define portDOUBLE double
\r
58 #define portLONG long
\r
59 #define portSHORT short
\r
60 #define portSTACK_TYPE uint16_t
\r
61 #define portBASE_TYPE short
\r
63 typedef portSTACK_TYPE StackType_t;
\r
64 typedef short BaseType_t;
\r
65 typedef unsigned short UBaseType_t;
\r
68 #if( configUSE_16_BIT_TICKS == 1 )
\r
69 typedef uint16_t TickType_t;
\r
70 #define portMAX_DELAY ( TickType_t ) 0xffff
\r
72 typedef uint32_t TickType_t;
\r
73 #define portMAX_DELAY ( TickType_t ) 0xffffffffUL
\r
75 /*-----------------------------------------------------------*/
\r
77 /* Critical section handling. */
\r
78 #if configKERNEL_INTERRUPT_PRIORITY != 6
\r
79 #error configKERNEL_INTERRUPT_PRIORITY (set in FreeRTOSConfig.h) must match the ILM value set in the following line - #06H being the default.
\r
81 #define portDISABLE_INTERRUPTS() __asm(" MOV ILM, #06h ")
\r
82 #define portENABLE_INTERRUPTS() __asm(" MOV ILM, #07h ")
\r
84 #define portENTER_CRITICAL() \
\r
85 { __asm(" PUSHW PS "); \
\r
86 portDISABLE_INTERRUPTS(); \
\r
89 #define portEXIT_CRITICAL() \
\r
90 { __asm(" POPW PS "); \
\r
93 /*-----------------------------------------------------------*/
\r
95 /* Architecture specifics. */
\r
96 #define portSTACK_GROWTH ( -1 )
\r
97 #define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
\r
98 #define portBYTE_ALIGNMENT 2
\r
99 #define portNOP() __asm( " NOP " );
\r
100 /*-----------------------------------------------------------*/
\r
102 /* portYIELD() uses SW interrupt */
\r
103 #define portYIELD() __asm( " INT #122 " );
\r
105 /* portYIELD_FROM_ISR() uses delayed interrupt */
\r
106 #define portYIELD_FROM_ISR() __asm( " SETB 03A4H:0 " );
\r
107 /*-----------------------------------------------------------*/
\r
109 /* Task function macros as described on the FreeRTOS.org WEB site. */
\r
110 #define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters )
\r
111 #define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )
\r
113 #define portMINIMAL_STACK_SIZE configMINIMAL_STACK_SIZE
\r
116 #endif /* PORTMACRO_H */
\r