ChibiOS/RT
2.5.1
Configuration
Collaboration diagram for Configuration:

Detailed Description

HAL Driver 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.

Drivers enable switches

#define HAL_USE_TM   TRUE
#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_EXT   FALSE
 Enables the EXT subsystem.
#define HAL_USE_GPT   FALSE
 Enables the GPT subsystem.
#define HAL_USE_I2C   FALSE
 Enables the I2C subsystem.
#define HAL_USE_ICU   FALSE
 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   FALSE
 Enables the RTC subsystem.
#define HAL_USE_SDC   FALSE
 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_SPI   TRUE
 Enables the SPI subsystem.
#define HAL_USE_UART   TRUE
 Enables the UART subsystem.
#define HAL_USE_USB   TRUE
 Enables the USB subsystem.

ADC driver related setting

#define ADC_USE_WAIT   TRUE
 Enables synchronous APIs.
#define ADC_USE_MUTUAL_EXCLUSION   TRUE
 Enables the adcAcquireBus() and adcReleaseBus() APIs.

CAN driver related setting

#define CAN_USE_SLEEP_MODE   TRUE
 Sleep mode related APIs inclusion switch.

I2C driver related setting

#define I2C_USE_MUTUAL_EXCLUSION   TRUE
 Enables the mutual exclusion APIs on the I2C bus.

MAC driver related setting

#define MAC_USE_EVENTS   TRUE
 Enables an event sources for incoming packets.

MMC_SPI driver related setting

#define MMC_SECTOR_SIZE   512
 Block size for MMC transfers.
#define MMC_NICE_WAITING   TRUE
 Delays insertions.
#define MMC_POLLING_INTERVAL   10
 Number of positive insertion queries before generating the insertion event.
#define MMC_POLLING_DELAY   10
 Interval, in milliseconds, between insertion queries.
#define MMC_USE_SPI_POLLING   TRUE
 Uses the SPI polled API for small data transfers.

SDC driver related setting

#define SDC_INIT_RETRY   100
 Number of initialization attempts before rejecting the card.
#define SDC_MMC_SUPPORT   FALSE
 Include support for MMC cards.
#define SDC_NICE_WAITING   TRUE
 Delays insertions.

SERIAL driver related setting

#define SERIAL_DEFAULT_BITRATE   38400
 Default bit rate.
#define SERIAL_BUFFERS_SIZE   16
 Serial buffers size.

SERIAL_USB driver related setting

#define SERIAL_USB_BUFFERS_SIZE   64
 Serial over USB buffers size.

SPI driver related setting

#define SPI_USE_WAIT   TRUE
 Enables synchronous APIs.
#define SPI_USE_MUTUAL_EXCLUSION   TRUE
 Enables the spiAcquireBus() and spiReleaseBus() APIs.

Define Documentation

#define HAL_USE_PAL   TRUE

Enables the PAL subsystem.

Definition at line 48 of file halconf.h.

#define HAL_USE_ADC   TRUE

Enables the ADC subsystem.

Definition at line 55 of file halconf.h.

#define HAL_USE_CAN   TRUE

Enables the CAN subsystem.

Definition at line 62 of file halconf.h.

#define HAL_USE_EXT   FALSE

Enables the EXT subsystem.

Definition at line 69 of file halconf.h.

#define HAL_USE_GPT   FALSE

Enables the GPT subsystem.

Definition at line 76 of file halconf.h.

#define HAL_USE_I2C   FALSE

Enables the I2C subsystem.

Definition at line 83 of file halconf.h.

#define HAL_USE_ICU   FALSE

Enables the ICU subsystem.

Definition at line 90 of file halconf.h.

#define HAL_USE_MAC   TRUE

Enables the MAC subsystem.

Definition at line 97 of file halconf.h.

#define HAL_USE_MMC_SPI   TRUE

Enables the MMC_SPI subsystem.

Definition at line 104 of file halconf.h.

#define HAL_USE_PWM   TRUE

Enables the PWM subsystem.

Definition at line 111 of file halconf.h.

#define HAL_USE_RTC   FALSE

Enables the RTC subsystem.

Definition at line 118 of file halconf.h.

#define HAL_USE_SDC   FALSE

Enables the SDC subsystem.

Definition at line 125 of file halconf.h.

#define HAL_USE_SERIAL   TRUE

Enables the SERIAL subsystem.

Definition at line 132 of file halconf.h.

#define HAL_USE_SERIAL_USB   TRUE

Enables the SERIAL over USB subsystem.

Definition at line 139 of file halconf.h.

#define HAL_USE_SPI   TRUE

Enables the SPI subsystem.

Definition at line 146 of file halconf.h.

#define HAL_USE_UART   TRUE

Enables the UART subsystem.

Definition at line 153 of file halconf.h.

#define HAL_USE_USB   TRUE

Enables the USB subsystem.

Definition at line 160 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 176 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 184 of file halconf.h.

#define CAN_USE_SLEEP_MODE   TRUE

Sleep mode related APIs inclusion switch.

Definition at line 199 of file halconf.h.

#define I2C_USE_MUTUAL_EXCLUSION   TRUE

Enables the mutual exclusion APIs on the I2C bus.

Definition at line 214 of file halconf.h.

#define MAC_USE_EVENTS   TRUE

Enables an event sources for incoming packets.

Definition at line 229 of file halconf.h.

#define MMC_SECTOR_SIZE   512

Block size for MMC transfers.

Definition at line 244 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 256 of file halconf.h.

#define MMC_POLLING_INTERVAL   10

Number of positive insertion queries before generating the insertion event.

Definition at line 264 of file halconf.h.

#define MMC_POLLING_DELAY   10

Interval, in milliseconds, between insertion queries.

Definition at line 271 of file halconf.h.

#define MMC_USE_SPI_POLLING   TRUE

Uses the SPI polled API for small data transfers.

Polled transfers usually improve performance because it saves two context switches and interrupt servicing. Note that this option has no effect on large transfers which are always performed using DMAs/IRQs.

Definition at line 282 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 298 of file halconf.h.

#define SDC_MMC_SUPPORT   FALSE

Include support for MMC cards.

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

Definition at line 307 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 317 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 334 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 64 bytes for both the transmission and receive buffers.

Definition at line 345 of file halconf.h.

#define SERIAL_USB_BUFFERS_SIZE   64

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 64 bytes for both the transmission and receive buffers.

Definition at line 364 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 380 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 388 of file halconf.h.