dRonin  adbada4
dRonin firmware
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages

Macros

#define CORTEX_USE_FPU   TRUE
 

Kernel parameters and options

#define CH_FREQUENCY   1000
 System tick frequency. More...
 
#define CH_TIME_QUANTUM   1
 Round robin interval. More...
 
#define CH_MEMCORE_SIZE   0
 Managed RAM size. More...
 
#define CH_NO_IDLE_THREAD   FALSE
 Idle thread automatic spawn suppression. More...
 

Performance options

#define CH_OPTIMIZE_SPEED   TRUE
 OS optimization. More...
 

Subsystem options

#define CH_USE_REGISTRY   TRUE
 Threads registry APIs. More...
 
#define CH_USE_WAITEXIT   TRUE
 Threads synchronization APIs. More...
 
#define CH_USE_SEMAPHORES   TRUE
 Semaphores APIs. More...
 
#define CH_USE_SEMAPHORES_PRIORITY   FALSE
 Semaphores queuing mode. More...
 
#define CH_USE_SEMSW   TRUE
 Atomic semaphore API. More...
 
#define CH_USE_MUTEXES   TRUE
 Mutexes APIs. More...
 
#define CH_USE_CONDVARS   FALSE
 Conditional Variables APIs. More...
 
#define CH_USE_CONDVARS_TIMEOUT   FALSE
 Conditional Variables APIs with timeout. More...
 
#define CH_USE_EVENTS   FALSE
 Events Flags APIs. More...
 
#define CH_USE_EVENTS_TIMEOUT   FALSE
 Events Flags APIs with timeout. More...
 
#define CH_USE_MESSAGES   FALSE
 Synchronous Messages APIs. More...
 
#define CH_USE_MESSAGES_PRIORITY   FALSE
 Synchronous Messages queuing mode. More...
 
#define CH_USE_MAILBOXES   TRUE
 Mailboxes APIs. More...
 
#define CH_USE_QUEUES   FALSE
 I/O Queues APIs. More...
 
#define CH_USE_MEMCORE   FALSE
 Core Memory Manager APIs. More...
 
#define CH_USE_HEAP   FALSE
 Heap Allocator APIs. More...
 
#define CH_USE_MALLOC_HEAP   FALSE
 C-runtime allocator. More...
 
#define CH_USE_MEMPOOLS   TRUE
 Memory Pools Allocator APIs. More...
 
#define CH_USE_DYNAMIC   FALSE
 Dynamic Threads APIs. More...
 

Debug options

#define CH_DBG_SYSTEM_STATE_CHECK   FALSE
 Debug option, system state check. More...
 
#define CH_DBG_ENABLE_CHECKS   FALSE
 Debug option, parameters checks. More...
 
#define CH_DBG_ENABLE_ASSERTS   FALSE
 Debug option, consistency checks. More...
 
#define CH_DBG_ENABLE_TRACE   FALSE
 Debug option, trace buffer. More...
 
#define CH_DBG_ENABLE_STACK_CHECK   FALSE
 Debug option, stack checks. More...
 
#define CH_DBG_FILL_THREADS   TRUE
 Debug option, stacks initialization. More...
 
#define CH_DBG_THREADS_PROFILING   FALSE
 Debug option, threads profiling. More...
 

Kernel hooks

typedef uint32_t halrtcnt_t
 Type of the realtime free counter value. More...
 

Macro Functions

#define halGetCounterValue()   hal_lld_get_counter_value()
 Returns the current value of the system free running counter. More...
 
#define hal_lld_get_counter_value()   DWT_CYCCNT
 Returns the current value of the system free running counter. More...
 
#define THREAD_EXT_FIELDS
 Threads descriptor structure extension. More...
 
#define THREAD_EXT_INIT_HOOK(tp)
 Threads initialization hook. More...
 
#define THREAD_EXT_EXIT_HOOK(tp)
 Threads finalization hook. More...
 
#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp)
 Context switch hook. More...
 
#define IDLE_LOOP_HOOK()
 Idle Loop hook. More...
 
#define SYSTEM_TICK_EVENT_HOOK()
 System tick event hook. More...
 
#define SYSTEM_HALT_HOOK()
 System halt hook. More...
 

Kernel parameters and options

#define CH_FREQUENCY   1000
 System tick frequency. More...
 
#define CH_TIME_QUANTUM   1
 Round robin interval. More...
 
#define CH_MEMCORE_SIZE   0
 Managed RAM size. More...
 
#define CH_NO_IDLE_THREAD   FALSE
 Idle thread automatic spawn suppression. More...
 

Performance options

#define CH_OPTIMIZE_SPEED   FALSE
 OS optimization. More...
 

Subsystem options

#define CH_USE_REGISTRY   TRUE
 Threads registry APIs. More...
 
#define CH_USE_WAITEXIT   TRUE
 Threads synchronization APIs. More...
 
#define CH_USE_SEMAPHORES   TRUE
 Semaphores APIs. More...
 
#define CH_USE_SEMAPHORES_PRIORITY   FALSE
 Semaphores queuing mode. More...
 
#define CH_USE_SEMSW   TRUE
 Atomic semaphore API. More...
 
#define CH_USE_MUTEXES   TRUE
 Mutexes APIs. More...
 
#define CH_USE_CONDVARS   FALSE
 Conditional Variables APIs. More...
 
#define CH_USE_CONDVARS_TIMEOUT   FALSE
 Conditional Variables APIs with timeout. More...
 
#define CH_USE_EVENTS   FALSE
 Events Flags APIs. More...
 
#define CH_USE_EVENTS_TIMEOUT   FALSE
 Events Flags APIs with timeout. More...
 
#define CH_USE_MESSAGES   FALSE
 Synchronous Messages APIs. More...
 
#define CH_USE_MESSAGES_PRIORITY   FALSE
 Synchronous Messages queuing mode. More...
 
#define CH_USE_MAILBOXES   TRUE
 Mailboxes APIs. More...
 
#define CH_USE_QUEUES   FALSE
 I/O Queues APIs. More...
 
#define CH_USE_MEMCORE   FALSE
 Core Memory Manager APIs. More...
 
#define CH_USE_HEAP   FALSE
 Heap Allocator APIs. More...
 
#define CH_USE_MALLOC_HEAP   FALSE
 C-runtime allocator. More...
 
#define CH_USE_MEMPOOLS   TRUE
 Memory Pools Allocator APIs. More...
 
#define CH_USE_DYNAMIC   FALSE
 Dynamic Threads APIs. More...
 

Debug options

#define CH_DBG_SYSTEM_STATE_CHECK   FALSE
 Debug option, system state check. More...
 
#define CH_DBG_ENABLE_CHECKS   FALSE
 Debug option, parameters checks. More...
 
#define CH_DBG_ENABLE_ASSERTS   FALSE
 Debug option, consistency checks. More...
 
#define CH_DBG_ENABLE_TRACE   FALSE
 Debug option, trace buffer. More...
 
#define CH_DBG_ENABLE_STACK_CHECK   FALSE
 Debug option, stack checks. More...
 
#define CH_DBG_FILL_THREADS   TRUE
 Debug option, stacks initialization. More...
 
#define CH_DBG_THREADS_PROFILING   FALSE
 Debug option, threads profiling. More...
 

Kernel hooks

typedef uint32_t halrtcnt_t
 Type of the realtime free counter value. More...
 

Macro Functions

#define halGetCounterValue()   hal_lld_get_counter_value()
 Returns the current value of the system free running counter. More...
 
#define hal_lld_get_counter_value()   DWT_CYCCNT
 Returns the current value of the system free running counter. More...
 
#define THREAD_EXT_FIELDS
 Threads descriptor structure extension. More...
 
#define THREAD_EXT_INIT_HOOK(tp)
 Threads initialization hook. More...
 
#define THREAD_EXT_EXIT_HOOK(tp)
 Threads finalization hook. More...
 
#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp)
 Context switch hook. More...
 
#define IDLE_LOOP_HOOK()
 Idle Loop hook. More...
 
#define SYSTEM_TICK_EVENT_HOOK()
 System tick event hook. More...
 
#define SYSTEM_HALT_HOOK()
 System halt hook. More...
 

Detailed Description

Kernel related settings and hooks.

Macro Definition Documentation

#define CH_DBG_ENABLE_ASSERTS   FALSE

Debug option, consistency checks.

If enabled then all the assertions in the kernel code are activated. This includes consistency checks inside the kernel, runtime anomalies and port-defined checks.

Note
The default is FALSE.

Definition at line 383 of file chconf.h.

#define CH_DBG_ENABLE_ASSERTS   FALSE

Debug option, consistency checks.

If enabled then all the assertions in the kernel code are activated. This includes consistency checks inside the kernel, runtime anomalies and port-defined checks.

Note
The default is FALSE.

Definition at line 387 of file chconf.h.

#define CH_DBG_ENABLE_CHECKS   FALSE

Debug option, parameters checks.

If enabled then the checks on the API functions input parameters are activated.

Note
The default is FALSE.

Definition at line 371 of file chconf.h.

#define CH_DBG_ENABLE_CHECKS   FALSE

Debug option, parameters checks.

If enabled then the checks on the API functions input parameters are activated.

Note
The default is FALSE.

Definition at line 375 of file chconf.h.

#define CH_DBG_ENABLE_STACK_CHECK   FALSE

Debug option, stack checks.

If enabled then a runtime stack check is performed.

Note
The default is FALSE.
The stack check is performed in a architecture/port dependent way. It may not be implemented or some ports.
The default failure mode is to halt the system with the global panic_msg variable set to NULL.

Definition at line 408 of file chconf.h.

#define CH_DBG_ENABLE_STACK_CHECK   FALSE

Debug option, stack checks.

If enabled then a runtime stack check is performed.

Note
The default is FALSE.
The stack check is performed in a architecture/port dependent way. It may not be implemented or some ports.
The default failure mode is to halt the system with the global panic_msg variable set to NULL.

Definition at line 412 of file chconf.h.

#define CH_DBG_ENABLE_TRACE   FALSE

Debug option, trace buffer.

If enabled then the context switch circular trace buffer is activated.

Note
The default is FALSE.

Definition at line 394 of file chconf.h.

#define CH_DBG_ENABLE_TRACE   FALSE

Debug option, trace buffer.

If enabled then the context switch circular trace buffer is activated.

Note
The default is FALSE.

Definition at line 398 of file chconf.h.

#define CH_DBG_FILL_THREADS   TRUE

Debug option, stacks initialization.

If enabled then the threads working area is filled with a byte value when a thread is created. This can be useful for the runtime measurement of the used stack.

Note
The default is FALSE.

Definition at line 420 of file chconf.h.

#define CH_DBG_FILL_THREADS   TRUE

Debug option, stacks initialization.

If enabled then the threads working area is filled with a byte value when a thread is created. This can be useful for the runtime measurement of the used stack.

Note
The default is FALSE.

Definition at line 424 of file chconf.h.

#define CH_DBG_SYSTEM_STATE_CHECK   FALSE

Debug option, system state check.

If enabled the correct call protocol for system APIs is checked at runtime.

Note
The default is FALSE.

Definition at line 360 of file chconf.h.

#define CH_DBG_SYSTEM_STATE_CHECK   FALSE

Debug option, system state check.

If enabled the correct call protocol for system APIs is checked at runtime.

Note
The default is FALSE.

Definition at line 364 of file chconf.h.

#define CH_DBG_THREADS_PROFILING   FALSE

Debug option, threads profiling.

If enabled then a field is added to the Thread structure that counts the system ticks occurred while executing the thread.

Note
The default is TRUE.
This debug option is defaulted to TRUE because it is required by some test cases into the test suite.

Definition at line 433 of file chconf.h.

#define CH_DBG_THREADS_PROFILING   FALSE

Debug option, threads profiling.

If enabled then a field is added to the Thread structure that counts the system ticks occurred while executing the thread.

Note
The default is TRUE.
This debug option is defaulted to TRUE because it is required by some test cases into the test suite.

Definition at line 437 of file chconf.h.

#define CH_FREQUENCY   1000

System tick frequency.

Frequency of the system timer that drives the system ticks. This setting also defines the system tick time unit.

Definition at line 44 of file chconf.h.

#define CH_FREQUENCY   1000

System tick frequency.

Frequency of the system timer that drives the system ticks. This setting also defines the system tick time unit.

Definition at line 48 of file chconf.h.

#define CH_MEMCORE_SIZE   0

Managed RAM size.

Size of the RAM area to be managed by the OS. If set to zero then the whole available RAM is used. The core memory is made available to the heap allocator and/or can be used directly through the simplified core memory allocator.

Note
In order to let the OS manage the whole RAM the linker script must provide the heap_base and heap_end symbols.
Requires CH_USE_MEMCORE.

Definition at line 74 of file chconf.h.

#define CH_MEMCORE_SIZE   0

Managed RAM size.

Size of the RAM area to be managed by the OS. If set to zero then the whole available RAM is used. The core memory is made available to the heap allocator and/or can be used directly through the simplified core memory allocator.

Note
In order to let the OS manage the whole RAM the linker script must provide the heap_base and heap_end symbols.
Requires CH_USE_MEMCORE.

Definition at line 78 of file chconf.h.

#define CH_NO_IDLE_THREAD   FALSE

Idle thread automatic spawn suppression.

When this option is activated the function chSysInit() does not spawn the idle thread automatically. The application has then the responsibility to do one of the following:

  • Spawn a custom idle thread at priority IDLEPRIO.
  • Change the main() thread priority to IDLEPRIO then enter an endless loop. In this scenario the main() thread acts as the idle thread.
Note
Unless an idle thread is spawned the main() thread must not enter a sleep state.

Definition at line 91 of file chconf.h.

#define CH_NO_IDLE_THREAD   FALSE

Idle thread automatic spawn suppression.

When this option is activated the function chSysInit() does not spawn the idle thread automatically. The application has then the responsibility to do one of the following:

  • Spawn a custom idle thread at priority IDLEPRIO.
  • Change the main() thread priority to IDLEPRIO then enter an endless loop. In this scenario the main() thread acts as the idle thread.
Note
Unless an idle thread is spawned the main() thread must not enter a sleep state.

Definition at line 95 of file chconf.h.

#define CH_OPTIMIZE_SPEED   FALSE

OS optimization.

If enabled then time efficient rather than space efficient code is used when two possible implementations exist.

Note
This is not related to the compiler optimization options.
The default is TRUE.

Definition at line 112 of file chconf.h.

#define CH_OPTIMIZE_SPEED   TRUE

OS optimization.

If enabled then time efficient rather than space efficient code is used when two possible implementations exist.

Note
This is not related to the compiler optimization options.
The default is TRUE.

Definition at line 116 of file chconf.h.

#define CH_TIME_QUANTUM   1

Round robin interval.

This constant is the number of system ticks allowed for the threads before preemption occurs. Setting this value to zero disables the preemption for threads with equal priority and the round robin becomes cooperative. Note that higher priority threads can still preempt, the kernel is always preemptive.

Note
Disabling the round robin preemption makes the kernel more compact and generally faster.

Definition at line 59 of file chconf.h.

#define CH_TIME_QUANTUM   1

Round robin interval.

This constant is the number of system ticks allowed for the threads before preemption occurs. Setting this value to zero disables the preemption for threads with equal priority and the round robin becomes cooperative. Note that higher priority threads can still preempt, the kernel is always preemptive.

Note
Disabling the round robin preemption makes the kernel more compact and generally faster.

Definition at line 63 of file chconf.h.

#define CH_USE_CONDVARS   FALSE

Conditional Variables APIs.

If enabled then the conditional variables APIs are included in the kernel.

Note
The default is TRUE.
Requires CH_USE_MUTEXES.

Definition at line 198 of file chconf.h.

#define CH_USE_CONDVARS   FALSE

Conditional Variables APIs.

If enabled then the conditional variables APIs are included in the kernel.

Note
The default is TRUE.
Requires CH_USE_MUTEXES.

Definition at line 202 of file chconf.h.

#define CH_USE_CONDVARS_TIMEOUT   FALSE

Conditional Variables APIs with timeout.

If enabled then the conditional variables APIs with timeout specification are included in the kernel.

Note
The default is TRUE.
Requires CH_USE_CONDVARS.

Definition at line 210 of file chconf.h.

#define CH_USE_CONDVARS_TIMEOUT   FALSE

Conditional Variables APIs with timeout.

If enabled then the conditional variables APIs with timeout specification are included in the kernel.

Note
The default is TRUE.
Requires CH_USE_CONDVARS.

Definition at line 214 of file chconf.h.

#define CH_USE_DYNAMIC   FALSE

Dynamic Threads APIs.

If enabled then the dynamic threads creation APIs are included in the kernel.

Note
The default is TRUE.
Requires CH_USE_WAITEXIT.
Requires CH_USE_HEAP and/or CH_USE_MEMPOOLS.

Definition at line 340 of file chconf.h.

#define CH_USE_DYNAMIC   FALSE

Dynamic Threads APIs.

If enabled then the dynamic threads creation APIs are included in the kernel.

Note
The default is TRUE.
Requires CH_USE_WAITEXIT.
Requires CH_USE_HEAP and/or CH_USE_MEMPOOLS.

Definition at line 344 of file chconf.h.

#define CH_USE_EVENTS   FALSE

Events Flags APIs.

If enabled then the event flags APIs are included in the kernel.

Note
The default is TRUE.

Definition at line 220 of file chconf.h.

#define CH_USE_EVENTS   FALSE

Events Flags APIs.

If enabled then the event flags APIs are included in the kernel.

Note
The default is TRUE.

Definition at line 224 of file chconf.h.

#define CH_USE_EVENTS_TIMEOUT   FALSE

Events Flags APIs with timeout.

If enabled then the events APIs with timeout specification are included in the kernel.

Note
The default is TRUE.
Requires CH_USE_EVENTS.

Definition at line 232 of file chconf.h.

#define CH_USE_EVENTS_TIMEOUT   FALSE

Events Flags APIs with timeout.

If enabled then the events APIs with timeout specification are included in the kernel.

Note
The default is TRUE.
Requires CH_USE_EVENTS.

Definition at line 236 of file chconf.h.

#define CH_USE_HEAP   FALSE

Heap Allocator APIs.

If enabled then the memory heap allocator APIs are included in the kernel.

Note
The default is TRUE.
Requires CH_USE_MEMCORE and either CH_USE_MUTEXES or CH_USE_SEMAPHORES.
Mutexes are recommended.

Definition at line 302 of file chconf.h.

#define CH_USE_HEAP   FALSE

Heap Allocator APIs.

If enabled then the memory heap allocator APIs are included in the kernel.

Note
The default is TRUE.
Requires CH_USE_MEMCORE and either CH_USE_MUTEXES or CH_USE_SEMAPHORES.
Mutexes are recommended.

Definition at line 306 of file chconf.h.

#define CH_USE_MAILBOXES   TRUE

Mailboxes APIs.

If enabled then the asynchronous messages (mailboxes) APIs are included in the kernel.

Note
The default is TRUE.
Requires CH_USE_SEMAPHORES.

Definition at line 267 of file chconf.h.

#define CH_USE_MAILBOXES   TRUE

Mailboxes APIs.

If enabled then the asynchronous messages (mailboxes) APIs are included in the kernel.

Note
The default is TRUE.
Requires CH_USE_SEMAPHORES.

Definition at line 271 of file chconf.h.

#define CH_USE_MALLOC_HEAP   FALSE

C-runtime allocator.

If enabled the the heap allocator APIs just wrap the C-runtime malloc() and free() functions.

Note
The default is FALSE.
Requires CH_USE_HEAP.
The C-runtime may or may not require CH_USE_MEMCORE, see the appropriate documentation.

Definition at line 316 of file chconf.h.

#define CH_USE_MALLOC_HEAP   FALSE

C-runtime allocator.

If enabled the the heap allocator APIs just wrap the C-runtime malloc() and free() functions.

Note
The default is FALSE.
Requires CH_USE_HEAP.
The C-runtime may or may not require CH_USE_MEMCORE, see the appropriate documentation.

Definition at line 320 of file chconf.h.

#define CH_USE_MEMCORE   FALSE

Core Memory Manager APIs.

If enabled then the core memory manager APIs are included in the kernel.

Note
The default is TRUE.

Definition at line 288 of file chconf.h.

#define CH_USE_MEMCORE   FALSE

Core Memory Manager APIs.

If enabled then the core memory manager APIs are included in the kernel.

Note
The default is TRUE.

Definition at line 292 of file chconf.h.

#define CH_USE_MEMPOOLS   TRUE

Memory Pools Allocator APIs.

If enabled then the memory pools allocator APIs are included in the kernel.

Note
The default is TRUE.

Definition at line 327 of file chconf.h.

#define CH_USE_MEMPOOLS   TRUE

Memory Pools Allocator APIs.

If enabled then the memory pools allocator APIs are included in the kernel.

Note
The default is TRUE.

Definition at line 331 of file chconf.h.

#define CH_USE_MESSAGES   FALSE

Synchronous Messages APIs.

If enabled then the synchronous messages APIs are included in the kernel.

Note
The default is TRUE.

Definition at line 243 of file chconf.h.

#define CH_USE_MESSAGES   FALSE

Synchronous Messages APIs.

If enabled then the synchronous messages APIs are included in the kernel.

Note
The default is TRUE.

Definition at line 247 of file chconf.h.

#define CH_USE_MESSAGES_PRIORITY   FALSE

Synchronous Messages queuing mode.

If enabled then messages are served by priority rather than in FIFO order.

Note
The default is FALSE. Enable this if you have special requirements.
Requires CH_USE_MESSAGES.

Definition at line 255 of file chconf.h.

#define CH_USE_MESSAGES_PRIORITY   FALSE

Synchronous Messages queuing mode.

If enabled then messages are served by priority rather than in FIFO order.

Note
The default is FALSE. Enable this if you have special requirements.
Requires CH_USE_MESSAGES.

Definition at line 259 of file chconf.h.

#define CH_USE_MUTEXES   TRUE

Mutexes APIs.

If enabled then the mutexes APIs are included in the kernel.

Note
The default is TRUE.

Definition at line 186 of file chconf.h.

#define CH_USE_MUTEXES   TRUE

Mutexes APIs.

If enabled then the mutexes APIs are included in the kernel.

Note
The default is TRUE.

Definition at line 190 of file chconf.h.

#define CH_USE_QUEUES   FALSE

I/O Queues APIs.

If enabled then the I/O queues APIs are included in the kernel.

Note
The default is TRUE.

Definition at line 277 of file chconf.h.

#define CH_USE_QUEUES   FALSE

I/O Queues APIs.

If enabled then the I/O queues APIs are included in the kernel.

Note
The default is TRUE.

Definition at line 281 of file chconf.h.

#define CH_USE_REGISTRY   TRUE

Threads registry APIs.

If enabled then the registry APIs are included in the kernel.

Note
The default is TRUE.

Definition at line 131 of file chconf.h.

#define CH_USE_REGISTRY   TRUE

Threads registry APIs.

If enabled then the registry APIs are included in the kernel.

Note
The default is TRUE.

Definition at line 135 of file chconf.h.

#define CH_USE_SEMAPHORES   TRUE

Semaphores APIs.

If enabled then the Semaphores APIs are included in the kernel.

Note
The default is TRUE.

Definition at line 152 of file chconf.h.

#define CH_USE_SEMAPHORES   TRUE

Semaphores APIs.

If enabled then the Semaphores APIs are included in the kernel.

Note
The default is TRUE.

Definition at line 156 of file chconf.h.

#define CH_USE_SEMAPHORES_PRIORITY   FALSE

Semaphores queuing mode.

If enabled then the threads are enqueued on semaphores by priority rather than in FIFO order.

Note
The default is FALSE. Enable this if you have special requirements.
Requires CH_USE_SEMAPHORES.

Definition at line 164 of file chconf.h.

#define CH_USE_SEMAPHORES_PRIORITY   FALSE

Semaphores queuing mode.

If enabled then the threads are enqueued on semaphores by priority rather than in FIFO order.

Note
The default is FALSE. Enable this if you have special requirements.
Requires CH_USE_SEMAPHORES.

Definition at line 168 of file chconf.h.

#define CH_USE_SEMSW   TRUE

Atomic semaphore API.

If enabled then the semaphores the chSemSignalWait() API is included in the kernel.

Note
The default is TRUE.
Requires CH_USE_SEMAPHORES.

Definition at line 176 of file chconf.h.

#define CH_USE_SEMSW   TRUE

Atomic semaphore API.

If enabled then the semaphores the chSemSignalWait() API is included in the kernel.

Note
The default is TRUE.
Requires CH_USE_SEMAPHORES.

Definition at line 180 of file chconf.h.

#define CH_USE_WAITEXIT   TRUE

Threads synchronization APIs.

If enabled then the chThdWait() function is included in the kernel.

Note
The default is TRUE.

Definition at line 142 of file chconf.h.

#define CH_USE_WAITEXIT   TRUE

Threads synchronization APIs.

If enabled then the chThdWait() function is included in the kernel.

Note
The default is TRUE.

Definition at line 146 of file chconf.h.

#define CORTEX_USE_FPU   TRUE

Definition at line 576 of file chconf.h.

#define hal_lld_get_counter_value ( )    DWT_CYCCNT

Returns the current value of the system free running counter.

Note
This service is implemented by returning the content of the DWT_CYCCNT register.
Returns
The value of the system free running counter of type halrtcnt_t.

Definition at line 479 of file chconf.h.

#define hal_lld_get_counter_value ( )    DWT_CYCCNT

Returns the current value of the system free running counter.

Note
This service is implemented by returning the content of the DWT_CYCCNT register.
Returns
The value of the system free running counter of type halrtcnt_t.

Definition at line 483 of file chconf.h.

#define halGetCounterValue ( )    hal_lld_get_counter_value()

Returns the current value of the system free running counter.

Note
This is an optional service that could not be implemented in all HAL implementations.
This function can be called from any context.
Returns
The value of the system free running counter of type halrtcnt_t.

Definition at line 467 of file chconf.h.

#define halGetCounterValue ( )    hal_lld_get_counter_value()

Returns the current value of the system free running counter.

Note
This is an optional service that could not be implemented in all HAL implementations.
This function can be called from any context.
Returns
The value of the system free running counter of type halrtcnt_t.

Definition at line 471 of file chconf.h.

#define IDLE_LOOP_HOOK ( )
Value:
{ \
extern void vApplicationIdleHook(void); \
}
void vApplicationIdleHook(void)
Definition: systemmod.c:844

Idle Loop hook.

This hook is continuously invoked by the idle thread loop.

Definition at line 536 of file chconf.h.

#define IDLE_LOOP_HOOK ( )
Value:
{ \
extern void vApplicationIdleHook(void); \
}
void vApplicationIdleHook(void)
Definition: systemmod.c:844

Idle Loop hook.

This hook is continuously invoked by the idle thread loop.

Definition at line 540 of file chconf.h.

#define SYSTEM_HALT_HOOK ( )
Value:
{ \
/* System halt code here.*/ \
}

System halt hook.

This hook is invoked in case to a system halting error before the system is halted.

Definition at line 559 of file chconf.h.

#define SYSTEM_HALT_HOOK ( )
Value:
{ \
/* System halt code here.*/ \
}

System halt hook.

This hook is invoked in case to a system halting error before the system is halted.

Definition at line 563 of file chconf.h.

#define SYSTEM_TICK_EVENT_HOOK ( )
Value:
{ \
/* System tick event code here.*/ \
}

System tick event hook.

This hook is invoked in the system tick handler immediately after processing the virtual timers queue.

Definition at line 548 of file chconf.h.

#define SYSTEM_TICK_EVENT_HOOK ( )
Value:
{ \
/* System tick event code here.*/ \
}

System tick event hook.

This hook is invoked in the system tick handler immediately after processing the virtual timers queue.

Definition at line 552 of file chconf.h.

#define THREAD_CONTEXT_SWITCH_HOOK (   ntp,
  otp 
)
Value:
{ \
ntp->ticks_switched_in = halGetCounterValue(); \
otp->ticks_total += ntp->ticks_switched_in - otp->ticks_switched_in; \
/* System halt code here.*/ \
}
#define halGetCounterValue()
Returns the current value of the system free running counter.
Definition: chconf.h:467

Context switch hook.

This hook is invoked just before switching between threads.

Definition at line 524 of file chconf.h.

#define THREAD_CONTEXT_SWITCH_HOOK (   ntp,
  otp 
)
Value:
{ \
ntp->ticks_switched_in = halGetCounterValue(); \
otp->ticks_total += ntp->ticks_switched_in - otp->ticks_switched_in; \
/* System halt code here.*/ \
}
#define halGetCounterValue()
Returns the current value of the system free running counter.
Definition: chconf.h:471

Context switch hook.

This hook is invoked just before switching between threads.

Definition at line 528 of file chconf.h.

#define THREAD_EXT_EXIT_HOOK (   tp)
Value:
{ \
/* Add threads finalization code here.*/ \
}

Threads finalization hook.

User finalization code added to the chThdExit() API.

Note
It is inserted into lock zone.
It is also invoked when the threads simply return in order to terminate.

Definition at line 514 of file chconf.h.

#define THREAD_EXT_EXIT_HOOK (   tp)
Value:
{ \
/* Add threads finalization code here.*/ \
}

Threads finalization hook.

User finalization code added to the chThdExit() API.

Note
It is inserted into lock zone.
It is also invoked when the threads simply return in order to terminate.

Definition at line 518 of file chconf.h.

#define THREAD_EXT_FIELDS
Value:
halrtcnt_t ticks_switched_in; \
halrtcnt_t ticks_total; \
/* Add threads custom fields here.*/
uint32_t halrtcnt_t
Type of the realtime free counter value.
Definition: chconf.h:454

Threads descriptor structure extension.

User fields added to the end of the Thread structure.

Definition at line 486 of file chconf.h.

#define THREAD_EXT_FIELDS
Value:
halrtcnt_t ticks_switched_in; \
halrtcnt_t ticks_total; \
/* Add threads custom fields here.*/
uint32_t halrtcnt_t
Type of the realtime free counter value.
Definition: chconf.h:454

Threads descriptor structure extension.

User fields added to the end of the Thread structure.

Definition at line 490 of file chconf.h.

#define THREAD_EXT_INIT_HOOK (   tp)
Value:
{ \
/* Add threads initialization code here.*/ \
}

Threads initialization hook.

User initialization code added to the chThdInit() API.

Note
It is invoked from within chThdInit() and implicitly from all the threads creation APIs.

Definition at line 500 of file chconf.h.

#define THREAD_EXT_INIT_HOOK (   tp)
Value:
{ \
/* Add threads initialization code here.*/ \
}

Threads initialization hook.

User initialization code added to the chThdInit() API.

Note
It is invoked from within chThdInit() and implicitly from all the threads creation APIs.

Definition at line 504 of file chconf.h.

Typedef Documentation

typedef uint32_t halrtcnt_t

Type of the realtime free counter value.

Definition at line 450 of file chconf.h.

typedef uint32_t halrtcnt_t

Type of the realtime free counter value.

Definition at line 454 of file chconf.h.