ChibiOS/HAL  6.1.0
Configuration

HAL Configuration. More...

Collaboration diagram for Configuration:

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.

Macros

#define HAL_USE_PAL   TRUE
 Enables the PAL subsystem. More...
 
#define HAL_USE_ADC   TRUE
 Enables the ADC subsystem. More...
 
#define HAL_USE_CAN   TRUE
 Enables the CAN subsystem. More...
 
#define HAL_USE_CRY   TRUE
 Enables the cryptographic subsystem. More...
 
#define HAL_USE_DAC   TRUE
 Enables the DAC subsystem. More...
 
#define HAL_USE_EXT   TRUE
 Enables the EXT subsystem. More...
 
#define HAL_USE_GPT   TRUE
 Enables the GPT subsystem. More...
 
#define HAL_USE_I2C   TRUE
 Enables the I2C subsystem. More...
 
#define HAL_USE_I2S   TRUE
 Enables the I2S subsystem. More...
 
#define HAL_USE_ICU   TRUE
 Enables the ICU subsystem. More...
 
#define HAL_USE_MAC   TRUE
 Enables the MAC subsystem. More...
 
#define HAL_USE_MMC_SPI   TRUE
 Enables the MMC_SPI subsystem. More...
 
#define HAL_USE_PWM   TRUE
 Enables the PWM subsystem. More...
 
#define HAL_USE_QSPI   TRUE
 Enables the QSPI subsystem. More...
 
#define HAL_USE_RTC   TRUE
 Enables the RTC subsystem. More...
 
#define HAL_USE_SDC   TRUE
 Enables the SDC subsystem. More...
 
#define HAL_USE_SERIAL   TRUE
 Enables the SERIAL subsystem. More...
 
#define HAL_USE_SERIAL_USB   TRUE
 Enables the SERIAL over USB subsystem. More...
 
#define HAL_USE_SPI   TRUE
 Enables the SPI subsystem. More...
 
#define HAL_USE_UART   TRUE
 Enables the UART subsystem. More...
 
#define HAL_USE_USB   TRUE
 Enables the USB subsystem. More...
 
#define HAL_USE_WDG   TRUE
 Enables the WDG subsystem. More...
 
#define PAL_USE_CALLBACKS   FALSE
 Enables synchronous APIs. More...
 
#define PAL_USE_WAIT   FALSE
 Enables synchronous APIs. More...
 
#define ADC_USE_WAIT   TRUE
 Enables synchronous APIs. More...
 
#define ADC_USE_MUTUAL_EXCLUSION   TRUE
 Enables the adcAcquireBus() and adcReleaseBus() APIs. More...
 
#define CAN_USE_SLEEP_MODE   TRUE
 Sleep mode related APIs inclusion switch. More...
 
#define CAN_ENFORCE_USE_CALLBACKS   FALSE
 Enforces the driver to use direct callbacks rather than OSAL events. More...
 
#define HAL_CRY_USE_FALLBACK   FALSE
 Enables the SW fall-back of the cryptographic driver. More...
 
#define HAL_CRY_ENFORCE_FALLBACK   FALSE
 Makes the driver forcibly use the fall-back implementations. More...
 
#define DAC_USE_WAIT   TRUE
 Enables synchronous APIs. More...
 
#define DAC_USE_MUTUAL_EXCLUSION   TRUE
 Enables the dacAcquireBus() and dacReleaseBus() APIs. More...
 
#define I2C_USE_MUTUAL_EXCLUSION   TRUE
 Enables the mutual exclusion APIs on the I2C bus. More...
 
#define MAC_USE_ZERO_COPY   TRUE
 Enables the zero-copy API. More...
 
#define MAC_USE_EVENTS   TRUE
 Enables an event sources for incoming packets. More...
 
#define MMC_NICE_WAITING   TRUE
 Delays insertions. More...
 
#define QSPI_USE_WAIT   TRUE
 Enables synchronous APIs. More...
 
#define QSPI_USE_MUTUAL_EXCLUSION   TRUE
 Enables the qspiAcquireBus() and qspiReleaseBus() APIs. More...
 
#define SDC_INIT_RETRY   100
 Number of initialization attempts before rejecting the card. More...
 
#define SDC_MMC_SUPPORT   TRUE
 Include support for MMC cards. More...
 
#define SDC_NICE_WAITING   TRUE
 Delays insertions. More...
 
#define SDC_INIT_OCR_V20   0x50FF8000U
 OCR initialization constant for V20 cards. More...
 
#define SDC_INIT_OCR   0x80100000U
 OCR initialization constant for non-V20 cards. More...
 
#define SERIAL_DEFAULT_BITRATE   38400
 Default bit rate. More...
 
#define SERIAL_BUFFERS_SIZE   16
 Serial buffers size. More...
 
#define SERIAL_USB_BUFFERS_SIZE   256
 Serial over USB buffers size. More...
 
#define SERIAL_USB_BUFFERS_NUMBER   2
 Serial over USB number of buffers. More...
 
#define SPI_USE_WAIT   TRUE
 Enables synchronous APIs. More...
 
#define SPI_USE_CIRCULAR   FALSE
 Enables circular transfers APIs. More...
 
#define SPI_USE_MUTUAL_EXCLUSION   TRUE
 Enables the spiAcquireBus() and spiReleaseBus() APIs. More...
 
#define SPI_SELECT_MODE   SPI_SELECT_MODE_PAD
 Handling method for SPI CS line. More...
 
#define UART_USE_WAIT   TRUE
 Enables synchronous APIs. More...
 
#define UART_USE_MUTUAL_EXCLUSION   TRUE
 Enables the uartAcquireBus() and uartReleaseBus() APIs. More...
 
#define USB_USE_WAIT   TRUE
 Enables synchronous APIs. More...
 

Macro Definition Documentation

#define HAL_USE_PAL   TRUE

Enables the PAL subsystem.

Definition at line 40 of file halconf.h.

#define HAL_USE_ADC   TRUE

Enables the ADC subsystem.

Definition at line 47 of file halconf.h.

#define HAL_USE_CAN   TRUE

Enables the CAN subsystem.

Definition at line 54 of file halconf.h.

#define HAL_USE_CRY   TRUE

Enables the cryptographic subsystem.

Definition at line 61 of file halconf.h.

#define HAL_USE_DAC   TRUE

Enables the DAC subsystem.

Definition at line 68 of file halconf.h.

#define HAL_USE_EXT   TRUE

Enables the EXT subsystem.

Definition at line 75 of file halconf.h.

#define HAL_USE_GPT   TRUE

Enables the GPT subsystem.

Definition at line 82 of file halconf.h.

#define HAL_USE_I2C   TRUE

Enables the I2C subsystem.

Definition at line 89 of file halconf.h.

#define HAL_USE_I2S   TRUE

Enables the I2S subsystem.

Definition at line 96 of file halconf.h.

#define HAL_USE_ICU   TRUE

Enables the ICU subsystem.

Definition at line 103 of file halconf.h.

#define HAL_USE_MAC   TRUE

Enables the MAC subsystem.

Definition at line 110 of file halconf.h.

#define HAL_USE_MMC_SPI   TRUE

Enables the MMC_SPI subsystem.

Definition at line 117 of file halconf.h.

#define HAL_USE_PWM   TRUE

Enables the PWM subsystem.

Definition at line 124 of file halconf.h.

#define HAL_USE_QSPI   TRUE

Enables the QSPI subsystem.

Definition at line 131 of file halconf.h.

#define HAL_USE_RTC   TRUE

Enables the RTC subsystem.

Definition at line 138 of file halconf.h.

#define HAL_USE_SDC   TRUE

Enables the SDC subsystem.

Definition at line 145 of file halconf.h.

#define HAL_USE_SERIAL   TRUE

Enables the SERIAL subsystem.

Definition at line 152 of file halconf.h.

#define HAL_USE_SERIAL_USB   TRUE

Enables the SERIAL over USB subsystem.

Definition at line 159 of file halconf.h.

#define HAL_USE_SPI   TRUE

Enables the SPI subsystem.

Definition at line 166 of file halconf.h.

#define HAL_USE_UART   TRUE

Enables the UART subsystem.

Definition at line 173 of file halconf.h.

#define HAL_USE_USB   TRUE

Enables the USB subsystem.

Definition at line 180 of file halconf.h.

#define HAL_USE_WDG   TRUE

Enables the WDG subsystem.

Definition at line 187 of file halconf.h.

#define PAL_USE_CALLBACKS   FALSE

Enables synchronous APIs.

Note
Disabling this option saves both code and data space.

Definition at line 199 of file halconf.h.

#define PAL_USE_WAIT   FALSE

Enables synchronous APIs.

Note
Disabling this option saves both code and data space.

Definition at line 207 of file halconf.h.

#define ADC_USE_WAIT   TRUE

Enables synchronous APIs.

Note
Disabling this option saves both code and data space.

Definition at line 219 of file halconf.h.

#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 227 of file halconf.h.

#define CAN_USE_SLEEP_MODE   TRUE

Sleep mode related APIs inclusion switch.

Definition at line 238 of file halconf.h.

#define CAN_ENFORCE_USE_CALLBACKS   FALSE

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

Definition at line 245 of file halconf.h.

#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 260 of file halconf.h.

#define HAL_CRY_ENFORCE_FALLBACK   FALSE

Makes the driver forcibly use the fall-back implementations.

Definition at line 267 of file halconf.h.

#define DAC_USE_WAIT   TRUE

Enables synchronous APIs.

Note
Disabling this option saves both code and data space.

Definition at line 279 of file halconf.h.

#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 287 of file halconf.h.

#define I2C_USE_MUTUAL_EXCLUSION   TRUE

Enables the mutual exclusion APIs on the I2C bus.

Definition at line 298 of file halconf.h.

#define MAC_USE_ZERO_COPY   TRUE

Enables the zero-copy API.

Definition at line 309 of file halconf.h.

#define MAC_USE_EVENTS   TRUE

Enables an event sources for incoming packets.

Definition at line 316 of file halconf.h.

#define MMC_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. This option is recommended also if the SPI driver does not use a DMA channel and heavily loads the CPU.

Definition at line 332 of file halconf.h.

#define QSPI_USE_WAIT   TRUE

Enables synchronous APIs.

Note
Disabling this option saves both code and data space.

Definition at line 344 of file halconf.h.

#define QSPI_USE_MUTUAL_EXCLUSION   TRUE

Enables the qspiAcquireBus() and qspiReleaseBus() APIs.

Note
Disabling this option saves both code and data space.

Definition at line 352 of file halconf.h.

#define SDC_INIT_RETRY   100

Number of initialization attempts before rejecting the card.

Note
Attempts are performed at 10mS intervals.

Definition at line 364 of file halconf.h.

#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 373 of file halconf.h.

#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 383 of file halconf.h.

#define SDC_INIT_OCR_V20   0x50FF8000U

OCR initialization constant for V20 cards.

Definition at line 390 of file halconf.h.

#define SDC_INIT_OCR   0x80100000U

OCR initialization constant for non-V20 cards.

Definition at line 397 of file halconf.h.

#define SERIAL_DEFAULT_BITRATE   38400

Default bit rate.

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

Definition at line 410 of file halconf.h.

#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 421 of file halconf.h.

#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 436 of file halconf.h.

#define SERIAL_USB_BUFFERS_NUMBER   2

Serial over USB number of buffers.

Note
The default is 2 buffers.

Definition at line 444 of file halconf.h.

#define SPI_USE_WAIT   TRUE

Enables synchronous APIs.

Note
Disabling this option saves both code and data space.

Definition at line 456 of file halconf.h.

#define SPI_USE_CIRCULAR   FALSE

Enables circular transfers APIs.

Note
Disabling this option saves both code and data space.

Definition at line 464 of file halconf.h.

#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 473 of file halconf.h.

#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 481 of file halconf.h.

#define UART_USE_WAIT   TRUE

Enables synchronous APIs.

Note
Disabling this option saves both code and data space.

Definition at line 493 of file halconf.h.

#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 501 of file halconf.h.

#define USB_USE_WAIT   TRUE

Enables synchronous APIs.

Note
Disabling this option saves both code and data space.

Definition at line 513 of file halconf.h.