8000 Clean up FreeRTOS header, include add'l APIs (#1891) · erpebe/arduino-pico@fa390f4 · GitHub
[go: up one dir, main page]

Skip to content

Commit fa390f4

Browse files
Clean up FreeRTOS header, include add'l APIs (earlephilhower#1891)
1 parent 0c7454b commit fa390f4

File tree

1 file changed

+63
-80
lines changed

1 file changed

+63
-80
lines changed
Lines changed: 63 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -1,127 +1,110 @@
1-
/* Cores */
2-
#define configNUM_CORES 2
3-
#define configUSE_CORE_AFFINITY 1
4-
#define configRUN_MULTIPLE_PRIORITIES 1
5-
6-
#define configUSE_PREEMPTION 1
7-
#define configUSE_IDLE_HOOK 1
8-
#define configUSE_MINIMAL_IDLE_HOOK 1
9-
#define configUSE_TICK_HOOK 1
10-
#define configCPU_CLOCK_HZ ( ( unsigned long ) F_CPU )
11-
#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )
12-
#define configMAX_PRIORITIES ( 8 )
13-
#define configMINIMA 8000 L_STACK_SIZE ( ( unsigned short ) 256 )
14-
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 164 * 1024 ) )
15-
#define configMAX_TASK_NAME_LEN ( 10 )
16-
#define configUSE_TRACE_FACILITY 1
17-
#define configUSE_16_BIT_TICKS 0
18-
#define configIDLE_SHOULD_YIELD 1
19-
#define configUSE_MUTEXES 1
20-
#define configQUEUE_REGISTRY_SIZE 8
21-
#define configUSE_RECURSIVE_MUTEXES 1
22-
#define configUSE_MALLOC_FAILED_HOOK 1
23-
#define configUSE_APPLICATION_TASK_TAG 0
24-
#define configUSE_COUNTING_SEMAPHORES 1
25-
#define configUSE_QUEUE_SETS 1
26-
#define configSUPPORT_DYNAMIC_ALLOCATION 1
27-
#define configSUPPORT_STATIC_ALLOCATION 1
28-
#define configSTACK_DEPTH_TYPE uint32_t
1+
#define configNUM_CORES 2
2+
#define configUSE_CORE_AFFINITY 1
3+
#define configRUN_MULTIPLE_PRIORITIES 1
4+
5+
#define configUSE_PREEMPTION 1
6+
#define configUSE_IDLE_HOOK 1
7+
#define configUSE_MINIMAL_IDLE_HOOK 1
8+
#define configUSE_TICK_HOOK 1
9+
#define configCPU_CLOCK_HZ ( ( unsigned long ) F_CPU )
10+
#define configTICK_RATE_HZ ( ( TickType_t ) 1000 )
11+
#define configMAX_PRIORITIES ( 8 )
12+
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 256 )
13+
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 164 * 1024 ) )
14+
#define configMAX_TASK_NAME_LEN ( 10 )
15+
#define configUSE_TRACE_FACILITY 1
16+
#define configUSE_16_BIT_TICKS 0
17+
#define configIDLE_SHOULD_YIELD 1
18+
#define configUSE_MUTEXES 1
19+
#define configQUEUE_REGISTRY_SIZE 8
20+
#define configUSE_RECURSIVE_MUTEXES 1
21+
#define configUSE_MALLOC_FAILED_HOOK 1
22+
#define configUSE_APPLICATION_TASK_TAG 0
23+
#define configUSE_COUNTING_SEMAPHORES 1
24+
#define configUSE_QUEUE_SETS 1
25+
#define configSUPPORT_DYNAMIC_ALLOCATION 1
26+
#define configSUPPORT_STATIC_ALLOCATION 1
27+
#define configSTACK_DEPTH_TYPE uint32_t
2928
#define configUSE_TASK_PREEMPTION_DISABLE 1
3029

31-
#define configUSE_NEWLIB_REENTRANT 1
30+
#define configUSE_NEWLIB_REENTRANT 1
3231
#define configNEWLIB_REENTRANT_IS_DYNAMIC 1
3332

3433
/* Run time stats related definitions. */
35-
void vMainConfigureTimerForRunTimeStats(void);
36-
unsigned long ulMainGetRunTimeCounterValue(void);
34+
extern void vMainConfigureTimerForRunTimeStats(void);
35+
extern unsigned long ulMainGetRunTimeCounterValue(void);
3736
#define configGENERATE_RUN_TIME_STATS 1
3837
#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() //vMainConfigureTimerForRunTimeStats()
3938
#define portGET_RUN_TIME_COUNTER_VALUE() ulMainGetRunTimeCounterValue()
4039

4140
/* Co-routine definitions. */
42-
#define configUSE_CO_ROUTINES 1
41+
#define configUSE_CO_ROUTINES 1
4342
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
4443

4544
/* Software timer definitions. */
46-
#define configUSE_TIMERS 1
47-
#define configTIMER_TASK_PRIORITY ( 2 )
48-
#define configTIMER_QUEUE_LENGTH 5
49-
#define configTIMER_TASK_STACK_DEPTH ( 1024 )
45+
#define configUSE_TIMERS 1
46+
#define configTIMER_TASK_PRIORITY ( 2 )
47+
#define configTIMER_QUEUE_LENGTH 5
48+
#define configTIMER_TASK_STACK_DEPTH ( 1024 )
5049

5150
/* Set the following definitions to 1 to include the API function, or zero
5251
to exclude the API function. */
53-
#define INCLUDE_xTaskGetCurrentTaskHandle 1
54-
#define INCLUDE_vTaskPrioritySet 1
55-
#define INCLUDE_uxTaskPriorityGet 1
56-
#define INCLUDE_vTaskDelete 1
57-
#define INCLUDE_vTaskCleanUpResources 1
58-
#define INCLUDE_vTaskSuspend 1
59-
#define INCLUDE_vTaskDelayUntil 1
60-
#define INCLUDE_vTaskDelay 1
61-
#define INCLUDE_eTaskGetState 1
52+
#define INCLUDE_eTaskGetState 1
53+
#define INCLUDE_uxTaskGetStackHighWaterMark 1
54+
#define INCLUDE_uxTaskPriorityGet 1
55+
#define INCLUDE_vTaskCleanUpResources 1
56+
#define INCLUDE_vTaskDelay 1
57+
#define INCLUDE_vTaskDelayUntil 1
58+
#define INCLUDE_vTaskDelete 1
59+
#define INCLUDE_vTaskPrioritySet 1
60+
#define INCLUDE_vTaskSuspend 1
61+
#define INCLUDE_xQueueGetMutexHolder 1
62+
#define INCLUDE_xTaskAbortDelay 1
63+
#define INCLUDE_xTaskGetCurrentTaskHandle 1
64+
#define INCLUDE_xTaskGetHandle 1
65+
#define INCLUDE_xTaskGetIdleTaskHandle 1
66+
#define INCLUDE_xTaskGetSchedulerState 1
67+
#define INCLUDE_xTaskResumeFromISR 1
68+
#define INCLUDE_xTimerPendFunctionCall 1
6269

63-
/* This demo makes use of one or more example stats formatting functions. These
64-
format the raw data provided by the uxTaskGetSystemState() function in to human
65-
readable ASCII form. See the notes in the implementation of vTaskList() within
66-
FreeRTOS/Source/tasks.c for limitations. */
6770
#define configUSE_STATS_FORMATTING_FUNCTIONS 1
6871

69-
#define configUSE_MUTEXES 1
70-
#define INCLUDE_uxTaskGetStackHighWaterMark 1
71-
#define INCLUDE_xTaskGetIdleTaskHandle 1
72-
#define configUSE_MALLOC_FAILED_HOOK 1
73-
#define configCHECK_FOR_STACK_OVERFLOW 2
74-
/* Normal assert() semantics without relying on the provision of an assert.h
75-
header file. */
72+
#define F438 configUSE_MUTEXES 1
73+
#define configUSE_MALLOC_FAILED_HOOK 1
74+
#define configCHECK_FOR_STACK_OVERFLOW 2
7675

7776
/* Cortex-M specific definitions. */
7877
#undef __NVIC_PRIO_BITS
7978
#ifdef __NVIC_PRIO_BITS
8079
/* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */
81-
#define configPRIO_BITS __NVIC_PRIO_BITS
80+
#define configPRIO_BITS __NVIC_PRIO_BITS
8281
#else
83-
#define configPRIO_BITS 3 /* 8 priority levels */
82+
#define configPRIO_BITS 3 /* 8 priority levels */
8483
#endif
8584

8685
/* The lowest interrupt priority that can be used in a call to a "set priority"
8786
function. */
88-
#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 0x7
87+
#define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 0x7
8988

9089
/* The highest interrupt priority that can be used by any interrupt service
9190
routine that makes calls to interrupt safe FreeRTOS API functions. DO NOT CALL
9291
INTERRUPT SAFE FREERTOS API FUNCTIONS FROM ANY INTERRUPT THAT HAS A HIGHER
9392
PRIORITY THAN THIS! (higher priorities are lower numeric values. */
94-
#define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 5
93+
#define configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY 5
9594

9695
/* Interrupt priorities used by the kernel port layer itself. These are generic
9796
to all Cortex-M ports, and do not rely on any particular library functions. */
98-
#define configKERNEL_INTERRUPT_PRIORITY ( configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
97+
#define configKERNEL_INTERRUPT_PRIORITY ( configLIBRARY_LOWEST_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
9998
/* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!
10099
See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */
101-
#define configMAX_SYSCALL_INTERRUPT_PRIORITY ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
100+
#define configMAX_SYSCALL_INTERRUPT_PRIORITY ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) )
102101

103102
extern void rtosFatalError(void);
104103
#define configASSERT( x ) \
105104
if( ( x ) == 0 ) { portDISABLE_INTERRUPTS(); rtosFatalError(); }
106105

107-
/* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS
108-
standard names - or at least those used in the unmodified vector table. */
109-
//#define xPortPendSVHandler PendSV_Handler
110-
//#define xPortSysTickHandler SysTick_Handler
111-
//#define vPortSVCHandler SVC_Handler
112-
113-
/* The size of the global output buffer that is available for use when there
114-
are multiple command interpreters running at once (for example, one on a UART
115-
and one on TCP/IP). This is done to prevent an output buffer being defined by
116-
each implementation - which would waste RAM. In this case, there is only one
117-
command interpreter running. */
118-
#define configCOMMAND_INT_MAX_OUTPUT_SIZE 2048
119-
120-
121106
#define configUSE_DYNAMIC_EXCEPTION_HANDLERS 0
122-
#define configSUPPORT_PICO_SYNC_INTEROP 1
123-
#define configSUPPORT_PICO_TIME_INTEROP 1
124-
107+
#define configSUPPORT_PICO_SYNC_INTEROP 1
108+
#define configSUPPORT_PICO_TIME_INTEROP 1
125109

126110
#include "rp2040_config.h"
127-
//#include "task.h"

0 commit comments

Comments
 (0)
0