Hardware Abstraction Layer (HAL)

General Description

HAL specific return codes definitions for all drivers.

HAL drivers are generally built on top of a lower level driver. In this case the errors returned from the HAL could be one of the values below or a value from that lower level driver. See the device specific documentation for details about the other error codes. The HAL uses the same CY_RSLT_CREATE macro to define result codes using the standard cy_rslt_t format. All HAL results use the module ID CY_RSLT_MODULE_ABSTRACTION_HAL. Driver distinction is done as part of the 16-bit code field. The HAL splits this into individual bytes. The upper byte signifies the HAL driver using values from the cyhal_rslt_module_chip enum. The lower byte is defined by each HAL driver.

API Reference

 ADC HAL Results
 ADC specific return codes.
 
 Clock HAL Results
 Clock specific return codes.
 
 Comparator HAL Results
 Comparator specific return codes.
 
 CRC HAL Results
 CRC specific return codes.
 
 DAC HAL Results
 DAC specific return codes.
 
 DMA HAL Results
 DMA specific return codes.
 
 EZI2C HAL Results
 EZI2C specific return codes.
 
 GPIO HAL Results
 GPIO specific return codes.
 
 HWMGR HAL Results
 HWMGR specific return codes.
 
 I2C HAL Results
 I2C specific return codes.
 
 I2S HAL Results
 I2S specific return codes.
 
 Interconnect HAL Results
 Interconnect specific return codes.
 
 IPC HAL Results
 IPC specific return codes.
 
 LPTimer HAL Results
 LPTimer specific return codes.
 
 NVM HAL Results
 NVM specific return codes.
 
 Opamp HAL Results
 Opamp specific return codes.
 
 PDM/PCM HAL Results
 PDM/PCM specific return codes.
 
 PWM HAL Results
 PWM specific return codes.
 
 QSPI HAL Results
 QSPI specific return codes.
 
 Quadrature Decoder HAL Results
 Quadrature Decoder specific return codes.
 
 RTC HAL Results
 RTC specific return codes.
 
 SDHC HAL Results
 SDHC specific return codes.
 
 SDIO HAL Results
 SDIO specific return codes.
 
 SPI HAL Results
 SPI specific return codes.
 
 SYSPM HAL Results
 SYSPM specific return codes.
 
 SYSTEM HAL Results
 SYSTEM specific return codes.
 
 TDM HAL Results
 TDM specific return codes.
 
 Timer HAL Results
 Timer specific return codes.
 
 TRNG HAL Results
 TRNG specific return codes.
 
 UART HAL Results
 UART specific return codes.
 
 USB Device HAL Results
 USB Device specific return codes.
 
 WDT HAL Results
 WDT specific return codes.
 

Enumerations

enum  cyhal_rslt_module_chip {
  CYHAL_RSLT_MODULE_ADC = (0x01) ,
  CYHAL_RSLT_MODULE_CLOCK = (0x02) ,
  CYHAL_RSLT_MODULE_COMP = (0x03) ,
  CYHAL_RSLT_MODULE_CRC = (0x04) ,
  CYHAL_RSLT_MODULE_DAC = (0x05) ,
  CYHAL_RSLT_MODULE_DMA = (0x06) ,
  CYHAL_RSLT_MODULE_EZI2C = (0x07) ,
  CYHAL_RSLT_MODULE_GPIO = (0x08) ,
  CYHAL_RSLT_MODULE_I2C = (0x09) ,
  CYHAL_RSLT_MODULE_I2S = (0x0A) ,
  CYHAL_RSLT_MODULE_IPC = (0x0B) ,
  CYHAL_RSLT_MODULE_INTERCONNECT = (0x0C) ,
  CYHAL_RSLT_MODULE_HWMGR = (0x0D) ,
  CYHAL_RSLT_MODULE_KEYSCAN = (0x0E) ,
  CYHAL_RSLT_MODULE_LPTIMER = (0x0F) ,
  CYHAL_RSLT_MODULE_NVM = (0x10) ,
  CYHAL_RSLT_MODULE_OPAMP = (0x11) ,
  CYHAL_RSLT_MODULE_PDMPCM = (0x12) ,
  CYHAL_RSLT_MODULE_PWM = (0x13) ,
  CYHAL_RSLT_MODULE_QSPI = (0x14) ,
  CYHAL_RSLT_MODULE_QUADDEC = (0x15) ,
  CYHAL_RSLT_MODULE_RTC = (0x16) ,
  CYHAL_RSLT_MODULE_SDHC = (0x17) ,
  CYHAL_RSLT_MODULE_SDIO = (0x18) ,
  CYHAL_RSLT_MODULE_SPI = (0x19) ,
  CYHAL_RSLT_MODULE_SYSPM = (0x1A) ,
  CYHAL_RSLT_MODULE_SYSTEM = (0x1B) ,
  CYHAL_RSLT_MODULE_TDM = (0x1C) ,
  CYHAL_RSLT_MODULE_TIMER = (0x1D) ,
  CYHAL_RSLT_MODULE_TRNG = (0x1E) ,
  CYHAL_RSLT_MODULE_UART = (0x1F) ,
  CYHAL_RSLT_MODULE_USB = (0x20) ,
  CYHAL_RSLT_MODULE_WDT = (0x21) ,
  CYHAL_RSLT_MODULE_IMPL_TCPWM = (0x22) ,
  CYHAL_RSLT_MODULE_IMPL_SCB = (0x23) ,
  CYHAL_RSLT_MODULE_T2TIMER = (0x24)
}
 Enum to specify module IDs for cy_rslt_t values returned from the HAL. More...
 

Enumeration Type Documentation

◆ cyhal_rslt_module_chip

Enum to specify module IDs for cy_rslt_t values returned from the HAL.

Enumerator
CYHAL_RSLT_MODULE_ADC 

An error occurred in ADC module.

CYHAL_RSLT_MODULE_CLOCK 

An error occurred in Clock module.

CYHAL_RSLT_MODULE_COMP 

An error occurred in comparator module.

CYHAL_RSLT_MODULE_CRC 

An error occurred in crypto CRC module.

CYHAL_RSLT_MODULE_DAC 

An error occurred in DAC module.

CYHAL_RSLT_MODULE_DMA 

An error occurred in DMA module.

CYHAL_RSLT_MODULE_EZI2C 

An error occurred in EZI2C module.

CYHAL_RSLT_MODULE_GPIO 

An error occurred in GPIO module.

CYHAL_RSLT_MODULE_I2C 

An error occurred in I2C module.

CYHAL_RSLT_MODULE_I2S 

An error occurred in I2S module.

CYHAL_RSLT_MODULE_IPC 

An error occurred in IPC module.

CYHAL_RSLT_MODULE_INTERCONNECT 

An error occurred in Interconnect module.

CYHAL_RSLT_MODULE_HWMGR 

An error occurred in hardware management module.

CYHAL_RSLT_MODULE_KEYSCAN 

An error occurred in KeyScan module.

CYHAL_RSLT_MODULE_LPTIMER 

An error occurred in LPTimer module.

CYHAL_RSLT_MODULE_NVM 

An error occurred in NVM module.

CYHAL_RSLT_MODULE_OPAMP 

An error occurred in OpAmp module.

CYHAL_RSLT_MODULE_PDMPCM 

An error occurred in PDM/PCM module.

CYHAL_RSLT_MODULE_PWM 

An error occurred in PWM module.

CYHAL_RSLT_MODULE_QSPI 

An error occurred in QSPI module.

CYHAL_RSLT_MODULE_QUADDEC 

An error occurred in Quadrature Decoder module.

CYHAL_RSLT_MODULE_RTC 

An error occurred in RTC module.

CYHAL_RSLT_MODULE_SDHC 

An error occurred in SDHC module.

CYHAL_RSLT_MODULE_SDIO 

An error occurred in SDIO module.

CYHAL_RSLT_MODULE_SPI 

An error occurred in SPI module.

CYHAL_RSLT_MODULE_SYSPM 

An error occurred in SysPM module.

CYHAL_RSLT_MODULE_SYSTEM 

An error occurred in System module.

CYHAL_RSLT_MODULE_TDM 

An error occurred in Timer module.

CYHAL_RSLT_MODULE_TIMER 

An error occurred in Timer module.

CYHAL_RSLT_MODULE_TRNG 

An error occurred in RNG module.

CYHAL_RSLT_MODULE_UART 

An error occurred in UART module.

CYHAL_RSLT_MODULE_USB 

An error occurred in USB module.

CYHAL_RSLT_MODULE_WDT 

An error occurred in WDT module.

CYHAL_RSLT_MODULE_IMPL_TCPWM 

An error occurred in TCPWM module (TCPWM based drivers are: Timer, PWM, Quadrature Decoder)

CYHAL_RSLT_MODULE_IMPL_SCB 

An error occurred in SCB module (SCB based drivers are: I2C, SPI, UART)

CYHAL_RSLT_MODULE_T2TIMER 

An error occurred in T2Timer module.