Hardware Abstraction Layer (HAL)
HAL Driver Availability Macros

General Description

Macros

#define CYHAL_API_VERSION   (2)
 Macro specifying the major version number of the HAL API. More...
 
#define CYHAL_DRIVER_AVAILABLE_HWMGR   (1)
 Macro specifying whether the HwMgr driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_GPIO   (1)
 Macro specifying whether the GPIO driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_INTERCONNECT   (1)
 Macro specifying whether the Interconnect driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_CLOCK   (1)
 Macro specifying whether the Clock driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_SYSTEM   (1)
 Macro specifying whether the System driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_EZI2C   (_CYHAL_DRIVER_AVAILABLE_SCB)
 Macro specifying whether the EzI2C driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_I2C   (_CYHAL_DRIVER_AVAILABLE_SCB)
 Macro specifying whether the I2C driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_SPI   (_CYHAL_DRIVER_AVAILABLE_SCB)
 Macro specifying whether the SPI driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_UART   (_CYHAL_DRIVER_AVAILABLE_SCB)
 Macro specifying whether the UART driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_WDT   (1)
 Macro specifying whether the WDT driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_TIMER   (_CYHAL_DRIVER_AVAILABLE_TCPWM)
 Macro specifying whether the Timer driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_PWM   (_CYHAL_DRIVER_AVAILABLE_TCPWM)
 Macro specifying whether the PWM driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_QUADDEC   (_CYHAL_DRIVER_AVAILABLE_TCPWM)
 Macro specifying whether the QuadDec driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_I2S   ((((CY_IP_MXAUDIOSS_INSTANCES) > 0) && (AUDIOSS_I2S || AUDIOSS0_I2S || AUDIOSS0_I2S_I2S)) || ((CY_IP_MXTDM_INSTANCES) > 0))
 Macro specifying whether the I2S driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_I2S_TX   (CYHAL_DRIVER_AVAILABLE_I2S)
 Macro specifying whether the TX functionality is available on the I2S driver for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_I2S_RX   (CYHAL_DRIVER_AVAILABLE_I2S)
 Macro specifying whether the RX functionality is available on the I2S driver for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_TDM   ((((CY_IP_MXAUDIOSS_INSTANCES) > 0) && (AUDIOSS_I2S || AUDIOSS0_I2S || AUDIOSS0_I2S_I2S)) || ((CY_IP_MXTDM_INSTANCES) > 0))
 Macro specifying whether the TDM driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_TDM_TX   (CYHAL_DRIVER_AVAILABLE_TDM)
 Macro specifying whether the TX functionality is available on the TDM driver for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_TDM_RX   (CYHAL_DRIVER_AVAILABLE_TDM)
 Macro specifying whether the RX functionality is available on the TDM driver for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_DMA   ((_CYHAL_DRIVER_AVAILABLE_DMA_DMAC) || (_CYHAL_DRIVER_AVAILABLE_DMA_DW))
 Macro specifying whether the DMA driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_IPC   ((CPUSS_IPC_IPC_NR > 0) || (CY_IP_MXIPC_INSTANCES > 0))
 Macro specifying whether the IPC driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_QSPI   ((CY_IP_MXSMIF_INSTANCES) > 0)
 Macro specifying whether the QSPI driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_LPTIMER   ((SRSS_NUM_MCWDT) > 0)
 Macro specifying whether the LPTimer driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_SDHC   ((CY_IP_MXSDHC_INSTANCES) > 0)
 Macro specifying whether the SDHC driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_SDIO   (((CY_IP_MXSDHC_INSTANCES) > 0) || (_CYHAL_DRIVER_AVAILABLE_SDIO_UDB))
 Macro specifying whether the SDIO driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_SDIO_HOST   (CYHAL_DRIVER_AVAILABLE_SDIO)
 Macro specifying whether the SDIO host driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_SDIO_DEV   (0)
 Macro specifying whether the SDIO dev driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_NVM   (_CYHAL_DRIVER_AVAILABLE_NVM_FLASH || _CYHAL_DRIVER_AVAILABLE_NVM_RRAM || _CYHAL_DRIVER_AVAILABLE_NVM_OTP)
 Macro specifying whether the NVM driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_FLASH   (_CYHAL_DRIVER_AVAILABLE_NVM_FLASH) /* Deprecated */
 Deprecated. More...
 
#define CYHAL_DRIVER_AVAILABLE_SYSPM   (1)
 Macro specifying whether the SysPM driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_RTC   (((((CY_IP_MXS40SSRSS_INSTANCES) > 0) || ((CY_IP_MXS40SRSS_INSTANCES) > 0)) && ((SRSS_BACKUP_PRESENT) > 0)) || (((SRSS_RTC_PRESENT) > 0) && ((SRSS_NUM_HIBDATA) > 0)))
 Macro specifying whether the RTC driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_COMP   ((_CYHAL_DRIVER_AVAILABLE_COMP_LP) || (_CYHAL_DRIVER_AVAILABLE_COMP_CTB))
 Macro specifying whether the COMP driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_CRC   (((CY_IP_MXCRYPTO_INSTANCES) > 0) && (CPUSS_CRYPTO_CRC))
 Macro specifying whether the CRC driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_DAC   (((CY_IP_MXS40PASS_INSTANCES) > 0) && ((CY_IP_MXS40PASS_CTDAC_INSTANCES) > 0))
 Macro specifying whether the DAC driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_KEYSCAN   ((CY_IP_MXKEYSCAN_INSTANCES) > 0)
 Macro specifying whether the KeyScan driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_OPAMP   (((CY_IP_MXS40PASS_INSTANCES) > 0) && ((CY_IP_MXS40PASS_CTB_INSTANCES) > 0))
 Macro specifying whether the OpAmp driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_PDMPCM   ((((CY_IP_MXAUDIOSS_INSTANCES) > 0) && (AUDIOSS_PDM || AUDIOSS0_PDM || AUDIOSS0_PDM_PDM)) || ((CY_IP_MXPDM_INSTANCES) > 0))
 Macro specifying whether the PDM/PCM driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_TRNG   ((((CY_IP_MXCRYPTO_INSTANCES) > 0) && ((CPUSS_CRYPTO_TR) > 0)) /*|| (((CY_IP_MXCRYPTOLITE_INSTANCES) > 0) && ((CRYPTO_TRNG_PRESENT) > 0))*/)
 Macro specifying whether the TRNG driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_USB_DEV   ((CY_IP_MXUSBFS_INSTANCES) > 0)
 Macro specifying whether the USB Dev driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_ADC   ((_CYHAL_DRIVER_AVAILABLE_ADC_SAR) || (_CYHAL_DRIVER_AVAILABLE_ADC_MIC))
 Macro specifying whether the ADC driver is available for the current device.
 

Macro Definition Documentation

◆ CYHAL_API_VERSION

#define CYHAL_API_VERSION   (2)

Macro specifying the major version number of the HAL API.

Since there are multiple HAL library implementations, this is not necessarily the same as the major version number of the library. It is instead intended as a single version number that can be used across implementation libraries to know what signatures to use in the case an API is updated in the future. Once an API is available, its API will remain consistant across libraries sharing the same version here.

Note
Support for new drivers/functionality may be added without changing the version number, to check for whether a specific driver is available, the CYHAL_DRIVER_AVAILABLE_X macros defined in HAL Driver Availability should be used.

◆ CYHAL_DRIVER_AVAILABLE_FLASH

#define CYHAL_DRIVER_AVAILABLE_FLASH   (_CYHAL_DRIVER_AVAILABLE_NVM_FLASH) /* Deprecated */

Deprecated.

Macro specifying whether the NVM driver is available for the current device