ChibiOS/HAL 9.0.0
Configuration

HAL Configuration. More...

Detailed Description

HAL Configuration.

The file halconf.h contains the high level settings for all the drivers supported by the HAL. The low level, platform dependent, settings are contained in the mcuconf.h file instead and are describe in the various platforms reference manuals.

Collaboration diagram for Configuration:

Macros

#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_9_0_
#define HAL_USE_PAL   TRUE
 Enables the PAL subsystem.
#define HAL_USE_ADC   TRUE
 Enables the ADC subsystem.
#define HAL_USE_CAN   TRUE
 Enables the CAN subsystem.
#define HAL_USE_CRY   TRUE
 Enables the cryptographic subsystem.
#define HAL_USE_DAC   TRUE
 Enables the DAC subsystem.
#define HAL_USE_EFL   TRUE
 Enables the EFlash subsystem.
#define HAL_USE_GPT   TRUE
 Enables the GPT subsystem.
#define HAL_USE_I2C   TRUE
 Enables the I2C subsystem.
#define HAL_USE_I2S   TRUE
 Enables the I2S subsystem.
#define HAL_USE_ICU   TRUE
 Enables the ICU subsystem.
#define HAL_USE_MAC   TRUE
 Enables the MAC subsystem.
#define HAL_USE_MMC_SPI   TRUE
 Enables the MMC_SPI subsystem.
#define HAL_USE_PWM   TRUE
 Enables the PWM subsystem.
#define HAL_USE_RTC   TRUE
 Enables the RTC subsystem.
#define HAL_USE_SDC   TRUE
 Enables the SDC subsystem.
#define HAL_USE_SERIAL   TRUE
 Enables the SERIAL subsystem.
#define HAL_USE_SERIAL_USB   TRUE
 Enables the SERIAL over USB subsystem.
#define HAL_USE_SIO   TRUE
 Enables the SIO subsystem.
#define HAL_USE_SPI   TRUE
 Enables the SPI subsystem.
#define HAL_USE_TRNG   TRUE
 Enables the TRNG subsystem.
#define HAL_USE_UART   TRUE
 Enables the UART subsystem.
#define HAL_USE_USB   TRUE
 Enables the USB subsystem.
#define HAL_USE_WDG   TRUE
 Enables the WDG subsystem.
#define HAL_USE_WSPI   TRUE
 Enables the WSPI subsystem.
#define PAL_USE_CALLBACKS   FALSE
 Enables synchronous APIs.
#define PAL_USE_WAIT   FALSE
 Enables synchronous APIs.
#define ADC_USE_WAIT   TRUE
 Enables synchronous APIs.
#define ADC_USE_MUTUAL_EXCLUSION   TRUE
 Enables the adcAcquireBus() and adcReleaseBus() APIs.
#define CAN_USE_SLEEP_MODE   TRUE
 Sleep mode related APIs inclusion switch.
#define CAN_ENFORCE_USE_CALLBACKS   FALSE
 Enforces the driver to use direct callbacks rather than OSAL events.
#define HAL_CRY_USE_FALLBACK   FALSE
 Enables the SW fall-back of the cryptographic driver.
#define HAL_CRY_ENFORCE_FALLBACK   FALSE
 Makes the driver forcibly use the fall-back implementations.
#define DAC_USE_WAIT   TRUE
 Enables synchronous APIs.
#define DAC_USE_MUTUAL_EXCLUSION   TRUE
 Enables the dacAcquireBus() and dacReleaseBus() APIs.
#define I2C_ENABLE_SLAVE_MODE   FALSE
 Slave mode API enable switch.
#define I2C_USE_MUTUAL_EXCLUSION   TRUE
 Enables the mutual exclusion APIs on the I2C bus.
#define MAC_USE_ZERO_COPY   TRUE
 Enables the zero-copy API.
#define MAC_USE_EVENTS   TRUE
 Enables an event sources for incoming packets.
#define MMC_IDLE_TIMEOUT_MS   1000
 Timeout before assuming a failure while waiting for card idle.
#define MMC_USE_MUTUAL_EXCLUSION   TRUE
 Mutual exclusion on the SPI bus.
#define SDC_INIT_RETRY   100
 Number of initialization attempts before rejecting the card.
#define SDC_MMC_SUPPORT   TRUE
 Include support for MMC cards.
#define SDC_NICE_WAITING   TRUE
 Delays insertions.
#define SDC_INIT_OCR_V20   0x50FF8000U
 OCR initialization constant for V20 cards.
#define SDC_INIT_OCR   0x80100000U
 OCR initialization constant for non-V20 cards.
#define SERIAL_DEFAULT_BITRATE   38400
 Default bit rate.
#define SERIAL_BUFFERS_SIZE   16
 Serial buffers size.
#define SIO_DEFAULT_BITRATE   38400
 Default bit rate.
#define SIO_USE_SYNCHRONIZATION   TRUE
 Support for thread synchronization API.
#define SERIAL_USB_BUFFERS_SIZE   256
 Serial over USB buffers size.
#define SERIAL_USB_BUFFERS_NUMBER   2
 Serial over USB number of buffers.
#define SPI_USE_WAIT   TRUE
 Enables synchronous APIs.
#define SPI_USE_ASSERT_ON_ERROR   TRUE
 Inserts an assertion on function errors before returning.
#define SPI_USE_MUTUAL_EXCLUSION   TRUE
 Enables the spiAcquireBus() and spiReleaseBus() APIs.
#define SPI_SELECT_MODE   SPI_SELECT_MODE_PAD
 Handling method for SPI CS line.
#define UART_USE_WAIT   TRUE
 Enables synchronous APIs.
#define UART_USE_MUTUAL_EXCLUSION   TRUE
 Enables the uartAcquireBus() and uartReleaseBus() APIs.
#define USB_USE_WAIT   TRUE
 Enables synchronous APIs.
#define WSPI_USE_WAIT   TRUE
 Enables synchronous APIs.
#define WSPI_USE_MUTUAL_EXCLUSION   TRUE
 Enables the wspiAcquireBus() and wspiReleaseBus() APIs.

Macro Definition Documentation

◆ _CHIBIOS_HAL_CONF_

#define _CHIBIOS_HAL_CONF_

Definition at line 31 of file halconf.h.

◆ _CHIBIOS_HAL_CONF_VER_9_0_

#define _CHIBIOS_HAL_CONF_VER_9_0_

Definition at line 32 of file halconf.h.

◆ HAL_USE_PAL

#define HAL_USE_PAL   TRUE

Enables the PAL subsystem.

Definition at line 40 of file halconf.h.

◆ HAL_USE_ADC

#define HAL_USE_ADC   TRUE

Enables the ADC subsystem.

Definition at line 47 of file halconf.h.

◆ HAL_USE_CAN

#define HAL_USE_CAN   TRUE

Enables the CAN subsystem.

Definition at line 54 of file halconf.h.

◆ HAL_USE_CRY

#define HAL_USE_CRY   TRUE

Enables the cryptographic subsystem.

Definition at line 61 of file halconf.h.

◆ HAL_USE_DAC

#define HAL_USE_DAC   TRUE

Enables the DAC subsystem.

Definition at line 68 of file halconf.h.

◆ HAL_USE_EFL

#define HAL_USE_EFL   TRUE

Enables the EFlash subsystem.

Definition at line 75 of file halconf.h.

◆ HAL_USE_GPT

#define HAL_USE_GPT   TRUE

Enables the GPT subsystem.

Definition at line 82 of file halconf.h.

◆ HAL_USE_I2C

#define HAL_USE_I2C   TRUE

Enables the I2C subsystem.

Definition at line 89 of file halconf.h.

◆ HAL_USE_I2S

#define HAL_USE_I2S   TRUE

Enables the I2S subsystem.

Definition at line 96 of file halconf.h.

◆ HAL_USE_ICU

#define HAL_USE_ICU   TRUE

Enables the ICU subsystem.

Definition at line 103 of file halconf.h.

◆ HAL_USE_MAC

#define HAL_USE_MAC   TRUE

Enables the MAC subsystem.

Definition at line 110 of file halconf.h.

◆ HAL_USE_MMC_SPI

#define HAL_USE_MMC_SPI   TRUE

Enables the MMC_SPI subsystem.

Definition at line 117 of file halconf.h.

◆ HAL_USE_PWM

#define HAL_USE_PWM   TRUE

Enables the PWM subsystem.

Definition at line 124 of file halconf.h.

◆ HAL_USE_RTC

#define HAL_USE_RTC   TRUE

Enables the RTC subsystem.

Definition at line 131 of file halconf.h.

◆ HAL_USE_SDC

#define HAL_USE_SDC   TRUE

Enables the SDC subsystem.

Definition at line 138 of file halconf.h.

◆ HAL_USE_SERIAL

#define HAL_USE_SERIAL   TRUE

Enables the SERIAL subsystem.

Definition at line 145 of file halconf.h.

◆ HAL_USE_SERIAL_USB

#define HAL_USE_SERIAL_USB   TRUE

Enables the SERIAL over USB subsystem.

Definition at line 152 of file halconf.h.

◆ HAL_USE_SIO

#define HAL_USE_SIO   TRUE

Enables the SIO subsystem.

Definition at line 159 of file halconf.h.

◆ HAL_USE_SPI

#define HAL_USE_SPI   TRUE

Enables the SPI subsystem.

Definition at line 166 of file halconf.h.

◆ HAL_USE_TRNG

#define HAL_USE_TRNG   TRUE

Enables the TRNG subsystem.

Definition at line 173 of file halconf.h.

◆ HAL_USE_UART

#define HAL_USE_UART   TRUE

Enables the UART subsystem.

Definition at line 180 of file halconf.h.

◆ HAL_USE_USB

#define HAL_USE_USB   TRUE

Enables the USB subsystem.

Definition at line 187 of file halconf.h.

◆ HAL_USE_WDG

#define HAL_USE_WDG   TRUE

Enables the WDG subsystem.

Definition at line 194 of file halconf.h.

◆ HAL_USE_WSPI

#define HAL_USE_WSPI   TRUE

Enables the WSPI subsystem.

Definition at line 201 of file halconf.h.

◆ PAL_USE_CALLBACKS

#define PAL_USE_CALLBACKS   FALSE

Enables synchronous APIs.

Note
Disabling this option saves both code and data space.

Definition at line 213 of file halconf.h.

◆ PAL_USE_WAIT

#define PAL_USE_WAIT   FALSE

Enables synchronous APIs.

Note
Disabling this option saves both code and data space.

Definition at line 221 of file halconf.h.

◆ ADC_USE_WAIT

#define ADC_USE_WAIT   TRUE

Enables synchronous APIs.

Note
Disabling this option saves both code and data space.

Definition at line 233 of file halconf.h.

◆ ADC_USE_MUTUAL_EXCLUSION

#define ADC_USE_MUTUAL_EXCLUSION   TRUE

Enables the adcAcquireBus() and adcReleaseBus() APIs.

Note
Disabling this option saves both code and data space.

Definition at line 241 of file halconf.h.

◆ CAN_USE_SLEEP_MODE

#define CAN_USE_SLEEP_MODE   TRUE

Sleep mode related APIs inclusion switch.

Definition at line 252 of file halconf.h.

◆ CAN_ENFORCE_USE_CALLBACKS

#define CAN_ENFORCE_USE_CALLBACKS   FALSE

Enforces the driver to use direct callbacks rather than OSAL events.

Definition at line 259 of file halconf.h.

◆ HAL_CRY_USE_FALLBACK

#define HAL_CRY_USE_FALLBACK   FALSE

Enables the SW fall-back of the cryptographic driver.

When enabled, this option, activates a fall-back software implementation for algorithms not supported by the underlying hardware.

Note
Fall-back implementations may not be present for all algorithms.

Definition at line 274 of file halconf.h.

◆ HAL_CRY_ENFORCE_FALLBACK

#define HAL_CRY_ENFORCE_FALLBACK   FALSE

Makes the driver forcibly use the fall-back implementations.

Definition at line 281 of file halconf.h.

◆ DAC_USE_WAIT

#define DAC_USE_WAIT   TRUE

Enables synchronous APIs.

Note
Disabling this option saves both code and data space.

Definition at line 293 of file halconf.h.

◆ DAC_USE_MUTUAL_EXCLUSION

#define DAC_USE_MUTUAL_EXCLUSION   TRUE

Enables the dacAcquireBus() and dacReleaseBus() APIs.

Note
Disabling this option saves both code and data space.

Definition at line 301 of file halconf.h.

◆ I2C_ENABLE_SLAVE_MODE

#define I2C_ENABLE_SLAVE_MODE   FALSE

Slave mode API enable switch.

Note
The low level driver must support this capability.

Definition at line 313 of file halconf.h.

◆ I2C_USE_MUTUAL_EXCLUSION

#define I2C_USE_MUTUAL_EXCLUSION   TRUE

Enables the mutual exclusion APIs on the I2C bus.

Definition at line 320 of file halconf.h.

◆ MAC_USE_ZERO_COPY

#define MAC_USE_ZERO_COPY   TRUE

Enables the zero-copy API.

Definition at line 331 of file halconf.h.

◆ MAC_USE_EVENTS

#define MAC_USE_EVENTS   TRUE

Enables an event sources for incoming packets.

Definition at line 338 of file halconf.h.

◆ MMC_IDLE_TIMEOUT_MS

#define MMC_IDLE_TIMEOUT_MS   1000

Timeout before assuming a failure while waiting for card idle.

Note
Time is in milliseconds.

Definition at line 350 of file halconf.h.

◆ MMC_USE_MUTUAL_EXCLUSION

#define MMC_USE_MUTUAL_EXCLUSION   TRUE

Mutual exclusion on the SPI bus.

Definition at line 357 of file halconf.h.

◆ SDC_INIT_RETRY

#define SDC_INIT_RETRY   100

Number of initialization attempts before rejecting the card.

Note
Attempts are performed at 10mS intervals.

Definition at line 369 of file halconf.h.

◆ SDC_MMC_SUPPORT

#define SDC_MMC_SUPPORT   TRUE

Include support for MMC cards.

Note
MMC support is not yet implemented so this option must be kept at FALSE.

Definition at line 378 of file halconf.h.

◆ SDC_NICE_WAITING

#define SDC_NICE_WAITING   TRUE

Delays insertions.

If enabled this options inserts delays into the MMC waiting routines releasing some extra CPU time for the threads with lower priority, this may slow down the driver a bit however.

Definition at line 388 of file halconf.h.

◆ SDC_INIT_OCR_V20

#define SDC_INIT_OCR_V20   0x50FF8000U

OCR initialization constant for V20 cards.

Definition at line 395 of file halconf.h.

◆ SDC_INIT_OCR

#define SDC_INIT_OCR   0x80100000U

OCR initialization constant for non-V20 cards.

Definition at line 402 of file halconf.h.

◆ SERIAL_DEFAULT_BITRATE

#define SERIAL_DEFAULT_BITRATE   38400

Default bit rate.

Configuration parameter, this is the baud rate selected for the default configuration.

Definition at line 415 of file halconf.h.

◆ SERIAL_BUFFERS_SIZE

#define SERIAL_BUFFERS_SIZE   16

Serial buffers size.

Configuration parameter, you can change the depth of the queue buffers depending on the requirements of your application.

Note
The default is 16 bytes for both the transmission and receive buffers.

Definition at line 426 of file halconf.h.

◆ SIO_DEFAULT_BITRATE

#define SIO_DEFAULT_BITRATE   38400

Default bit rate.

Configuration parameter, this is the baud rate selected for the default configuration.

Definition at line 439 of file halconf.h.

◆ SIO_USE_SYNCHRONIZATION

#define SIO_USE_SYNCHRONIZATION   TRUE

Support for thread synchronization API.

Definition at line 446 of file halconf.h.

◆ SERIAL_USB_BUFFERS_SIZE

#define SERIAL_USB_BUFFERS_SIZE   256

Serial over USB buffers size.

Configuration parameter, the buffer size must be a multiple of the USB data endpoint maximum packet size.

Note
The default is 256 bytes for both the transmission and receive buffers.

Definition at line 461 of file halconf.h.

◆ SERIAL_USB_BUFFERS_NUMBER

#define SERIAL_USB_BUFFERS_NUMBER   2

Serial over USB number of buffers.

Note
The default is 2 buffers.

Definition at line 469 of file halconf.h.

◆ SPI_USE_WAIT

#define SPI_USE_WAIT   TRUE

Enables synchronous APIs.

Note
Disabling this option saves both code and data space.

Definition at line 481 of file halconf.h.

◆ SPI_USE_ASSERT_ON_ERROR

#define SPI_USE_ASSERT_ON_ERROR   TRUE

Inserts an assertion on function errors before returning.

Definition at line 488 of file halconf.h.

◆ SPI_USE_MUTUAL_EXCLUSION

#define SPI_USE_MUTUAL_EXCLUSION   TRUE

Enables the spiAcquireBus() and spiReleaseBus() APIs.

Note
Disabling this option saves both code and data space.

Definition at line 496 of file halconf.h.

◆ SPI_SELECT_MODE

#define SPI_SELECT_MODE   SPI_SELECT_MODE_PAD

Handling method for SPI CS line.

Note
Disabling this option saves both code and data space.

Definition at line 504 of file halconf.h.

◆ UART_USE_WAIT

#define UART_USE_WAIT   TRUE

Enables synchronous APIs.

Note
Disabling this option saves both code and data space.

Definition at line 516 of file halconf.h.

◆ UART_USE_MUTUAL_EXCLUSION

#define UART_USE_MUTUAL_EXCLUSION   TRUE

Enables the uartAcquireBus() and uartReleaseBus() APIs.

Note
Disabling this option saves both code and data space.

Definition at line 524 of file halconf.h.

◆ USB_USE_WAIT

#define USB_USE_WAIT   TRUE

Enables synchronous APIs.

Note
Disabling this option saves both code and data space.

Definition at line 536 of file halconf.h.

◆ WSPI_USE_WAIT

#define WSPI_USE_WAIT   TRUE

Enables synchronous APIs.

Note
Disabling this option saves both code and data space.

Definition at line 548 of file halconf.h.

◆ WSPI_USE_MUTUAL_EXCLUSION

#define WSPI_USE_MUTUAL_EXCLUSION   TRUE

Enables the wspiAcquireBus() and wspiReleaseBus() APIs.

Note
Disabling this option saves both code and data space.

Definition at line 556 of file halconf.h.