HALFRED  0.4.0
Macros
HAL configuration file

Detailed Description

Macros

#define HAL_CORE_USE_POWER_MANAGEMENT   0
 
#define HAL_CORE_IS_BIG_ENDIAN   0
 
#define HAL_HEAP_MODE   0
 
#define HAL_HEAP_SIZE   0
 
#define HAL_HEAP_DEBUG   0
 
#define HAL_STACK_SIZE   1024
 
#define HAL_ENABLE_CLK   1
 
#define HAL_ENABLE_DELAY   0
 
#define HAL_F_CPU   80000000
 
#define HAL_ENABLE_GPIO   1
 
#define HAL_ENABLE_DIAG   0
 
#define HAL_DIAG_MAX_CHANNELS   4
 
#define HAL_DIAG_LEVEL   0
 
#define HAL_DIAG_USE_ERROR_BUFFERING   1
 
#define HAL_DIAG_ERROR_BUFFER_SIZE   30
 
#define HAL_DIAG_USE_ERROR_TIME_STAMPS   1
 
#define HAL_DIAG_ERROR_SEND_AS_FORMATED_DATA   0
 
#define HAL_ENABLE_IO   1
 
#define HAL_IO_OS_INTEGRATION   0
 
#define HAL_IO_USE_EVENTS   0
 
#define HAL_ENABLE_TIM   0
 
#define HAL_ENABLE_OS   0
 
#define HAL_OS_NOTIFIER_POOL_SIZE   10
 
#define HAL_ENABLE_CLI   0
 

Definitions specific to AVR port

These definitions configure the AVR port.

#define HALPORT_USE_USART0   1
 

Macro Definition Documentation

#define HAL_CORE_IS_BIG_ENDIAN   0

This definition controls the endianess conversion routines.

For little-endian CPUs this should be set to 0. For big-endian CPUs this should be set to 1.

#define HAL_HEAP_MODE   0

This definition controls how heap memory is serviced in HAL.

If HAL_HEAP_MODE is defined as 0, the heap will be serviced by malloc() and free(), unless there is a default OS implementation (like pvPortMalloc and vPortFree for FreeRTOS). This is the default mode - set this if you don't know what else to do.

If HAL_HEAP_MODE is defined as 1, the heap will be serviced by HALFRED's simple internal heap manager. This also means, that whenever possible, OS heap will also be serviced by the HALFRED's internal heap manager. The internal memory manager does NOT provide methods for freeing allocated heap space.

If HAL_HEAP_MODE is defined as 2, the heap will be serviced by HALFRED's more advanced internal heap manager. This also means, that whenever possible, OS heap will also be serviced by the HALFRED's internal heap manager. The internal memory manager does provide methods for freeing allocated heap space.

If HAL_HEAP_MODE is defined as 3, the user is responsible for providing own implementation of HEAP_Alloc and HEAP_Free functions.

In modes 1, 2 and 3 the HAL_HEAP_SIZE definition should be set to non-zero value.

#define HAL_HEAP_SIZE   0

Size of heap when HALFRED's internal heap manager is used (HAL_HEAP_MODE == 1 or 2).

#define HAL_HEAP_DEBUG   0

Controls if the heap usage shall be logged via DIAG module (1) or not (0). If this definition is set to 1, each heap allocation and deallocation will be logged.

#define HAL_STACK_SIZE   1024

Size of the memory reserved for stack (expressed in processor words).

#define HAL_ENABLE_CLK   1

If defined as 1, the CLK module will be enabled.

#define HAL_ENABLE_DELAY   0

If defined as 1, the DELAY module will be enabled.

#define HAL_F_CPU   80000000

Defines the core clock frequency. This definition is used by the delay loops in order to calculate the right amount of delay.

#define HAL_ENABLE_GPIO   1

If defined as 1, the GPIO module will be enabled

#define HAL_ENABLE_DIAG   0

If defined as 1, the DIAG module will be enabled.

#define HAL_DIAG_MAX_CHANNELS   4

Maximum number of diagnostic channels that can be used by the application and it's components. Please note that if the DIAG module is enabled, at least one diagnostic channel should be available allowing HAL itself to provide it's diagnostic output. By default the maximum number of channels is set to 4.

#define HAL_DIAG_LEVEL   0

Controls the detail level of the diagnostic messages for DIAG module. Zero means the least detail.

#define HAL_DIAG_USE_ERROR_BUFFERING   1

If defined as 1, the DIAG module will use error buffering.

#define HAL_DIAG_ERROR_BUFFER_SIZE   30

This definition controls the size of the error buffer, when error buffering is enabled in DIAG module (see HAL_DIAG_USE_ERROR_BUFFERING ).

#define HAL_DIAG_USE_ERROR_TIME_STAMPS   1

If defined as 1, the DIAG module will use error time stamps.

#define HAL_DIAG_ERROR_SEND_AS_FORMATED_DATA   0

If defined as 1, the DIAG module will output formatted data.

#define HAL_ENABLE_IO   1

If defined as 1, the IO module will be enabled.

#define HAL_IO_OS_INTEGRATION   0

If defined as 1, the OS integration mode will be enabled for IO operations. This allows the IO module to use features provided by OS to handle things like blocking read and write calls with timeouts. Setting this to one requires HAL_ENABLE_OS to be also set to one.

#define HAL_IO_USE_EVENTS   0

If defined as 1, events in IO module will be enabled.

#define HAL_ENABLE_TIM   0

If defined as 1, the TIM module will be enabled.

#define HAL_ENABLE_OS   0

If defined as 1, the OS module will be enabled.

#define HAL_OS_NOTIFIER_POOL_SIZE   10

Size of the internal OSNotifier pool. See OSNotifier interface for details.

#define HAL_ENABLE_CLI   0

If defined as 1, the CLI module will be enabled.

#define HALPORT_USE_USART0   1

If defined as 1, the USART0 will be provided as an IODevice.