|
ChibiOS/RT
2.5.1 |
|
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 HAL_USE_MMC_SPI TRUE |
| #define HAL_USE_SERIAL_USB TRUE |
| #define ADC_USE_WAIT TRUE |
| #define ADC_USE_MUTUAL_EXCLUSION TRUE |
| #define CAN_USE_SLEEP_MODE TRUE |
| #define I2C_USE_MUTUAL_EXCLUSION TRUE |
| #define MAC_USE_EVENTS TRUE |
| #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.
| #define MMC_POLLING_INTERVAL 10 |
| #define MMC_POLLING_DELAY 10 |
| #define MMC_USE_SPI_POLLING TRUE |
| #define SDC_INIT_RETRY 100 |
| #define SDC_MMC_SUPPORT FALSE |
| #define SDC_NICE_WAITING TRUE |
| #define SERIAL_DEFAULT_BITRATE 38400 |
| #define SERIAL_BUFFERS_SIZE 16 |
| #define SERIAL_USB_BUFFERS_SIZE 64 |
| #define SPI_USE_WAIT TRUE |