PSoC 6 Hardware Abstraction Layer (HAL)
Implementation-defined types

General Description

Aliases for types which are part of the public HAL interface but whose representations need to vary per HAL implementation

Data Structures

struct  cyhal_resource_inst_t
 Represents a particular instance of a resource on the chip. More...
 
struct  cyhal_clock_divider_t
 Clock divider object. More...
 
struct  cyhal_event_callback_data_t
 Event callback data object. More...
 
struct  cyhal_adc_t
 ADC object. More...
 
struct  cyhal_adc_channel_t
 ADC channel object. More...
 
struct  cyhal_comp_t
 Comparator object. More...
 
struct  cyhal_crc_t
 CRC object. More...
 
struct  cyhal_dac_t
 DAC object. More...
 
struct  cyhal_dma_t
 DMA object. More...
 
struct  cyhal_flash_t
 Flash object. More...
 
struct  cyhal_i2c_t
 I2C object. More...
 
struct  cyhal_i2s_t
 I2S object. More...
 
struct  cyhal_lptimer_t
 LPTIMER object. More...
 
struct  cyhal_opamp_t
 OpAmp object. More...
 
struct  cyhal_pdm_pcm_t
 PDM-PCM object. More...
 
struct  cyhal_pwm_t
 PWM object. More...
 
struct  cyhal_qspi_t
 SMIF object. More...
 
struct  cyhal_trng_t
 RNG object. More...
 
struct  cyhal_rtc_t
 RTC object. More...
 
struct  cyhal_sdhc_t
 SDHC object. More...
 
struct  cyhal_sdio_t
 SDIO object. More...
 
struct  cyhal_spi_t
 SPI object. More...
 
struct  cyhal_timer_t
 Timer object. More...
 
struct  cyhal_uart_t
 UART object. More...
 
struct  cyhal_usb_dev_t
 USB Device object. More...
 
struct  cyhal_wdt_t
 WDT object. More...
 

Macros

#define CYHAL_ISR_PRIORITY_DEFAULT   (7)
 
#define cyhal_system_callback_t   cy_stc_syspm_callback_t
 

Typedefs

typedef uint32_t cyhal_source_t
 Routable signal source.
 
typedef uint32_t cyhal_dest_t
 Routable signal destination.
 
typedef cy_en_divider_types_t cyhal_clock_divider_types_t
 
typedef uint16_t cyhal_system_divider_t
 

Enumerations

enum  cyhal_resource_t {
  CYHAL_RSC_ADC, CYHAL_RSC_BLESS, CYHAL_RSC_CAN, CYHAL_RSC_CLKPATH,
  CYHAL_RSC_CLOCK, CYHAL_RSC_CRYPTO, CYHAL_RSC_DAC, CYHAL_RSC_DMA,
  CYHAL_RSC_GPIO, CYHAL_RSC_I2S, CYHAL_RSC_LCD, CYHAL_RSC_LPCOMP,
  CYHAL_RSC_LPTIMER, CYHAL_RSC_OPAMP, CYHAL_RSC_PDM, CYHAL_RSC_SMIF,
  CYHAL_RSC_RTC, CYHAL_RSC_SCB, CYHAL_RSC_SDHC, CYHAL_RSC_TCPWM,
  CYHAL_RSC_UDB, CYHAL_RSC_USB, CYHAL_RSC_INVALID
}
 
enum  cyhal_system_clock_t { CYHAL_SYSTEM_CLOCK_CM4, CYHAL_SYSTEM_CLOCK_CM0, CYHAL_SYSTEM_CLOCK_PERI }
 

Data Structure Documentation

◆ cyhal_resource_inst_t

struct cyhal_resource_inst_t
Data Fields
cyhal_resource_t type The resource block type.
uint8_t block_num The resource block index.
uint8_t channel_num

The channel number, if the resource type defines multiple channels per block instance. Otherwise, 0

◆ cyhal_clock_divider_t

struct cyhal_clock_divider_t
Data Fields
cyhal_clock_divider_types_t div_type
uint8_t div_num

◆ cyhal_event_callback_data_t

struct cyhal_event_callback_data_t
Data Fields
cy_israddress callback
void * callback_arg

◆ cyhal_adc_t

struct cyhal_adc_t
Data Fields
SAR_Type * base
cyhal_resource_inst_t resource
cyhal_clock_divider_t clock
bool dedicated_clock
uint16_t channel_used

◆ cyhal_adc_channel_t

struct cyhal_adc_channel_t
Data Fields
cyhal_adc_t * adc
cyhal_gpio_t pin
uint8_t channel_idx

◆ cyhal_comp_t

struct cyhal_comp_t
Data Fields
void * TODO_define

◆ cyhal_crc_t

struct cyhal_crc_t
Data Fields
CRYPTO_Type * base
cyhal_resource_inst_t resource
uint32_t crc_width

◆ cyhal_dac_t

struct cyhal_dac_t
Data Fields
CTDAC_Type * base
cyhal_resource_inst_t resource
cyhal_gpio_t pin

◆ cyhal_dma_t

struct cyhal_dma_t
Data Fields
cyhal_resource_inst_t resource

◆ cyhal_flash_t

struct cyhal_flash_t
Data Fields
void * empty

◆ cyhal_i2c_t

struct cyhal_i2c_t
Data Fields
CySCB_Type * base
cyhal_resource_inst_t resource
cyhal_gpio_t pin_sda
cyhal_gpio_t pin_scl
cyhal_clock_divider_t clock
bool is_shared_clock
cy_stc_scb_i2c_context_t context
cy_stc_scb_i2c_master_xfer_config_t rx_config
cy_stc_scb_i2c_master_xfer_config_t tx_config
bool is_slave
bool async
uint32_t address
uint32_t irq_cause
uint16_t pending
uint16_t events
cyhal_event_callback_data_t callback_data

◆ cyhal_i2s_t

struct cyhal_i2s_t
Data Fields
void * TODO_define

◆ cyhal_lptimer_t

struct cyhal_lptimer_t
Data Fields
MCWDT_STRUCT_Type * base
cyhal_resource_inst_t resource
cyhal_event_callback_data_t callback_data

◆ cyhal_opamp_t

struct cyhal_opamp_t
Data Fields
void * TODO_define

◆ cyhal_pdm_pcm_t

struct cyhal_pdm_pcm_t
Data Fields
void * TODO_define

◆ cyhal_pwm_t

struct cyhal_pwm_t
Data Fields
TCPWM_Type * base
cyhal_resource_inst_t resource
cyhal_gpio_t pin
cyhal_clock_divider_t clock
uint32_t clock_hz
bool dedicated_clock
cyhal_event_callback_data_t callback_data

◆ cyhal_qspi_t

struct cyhal_qspi_t
Data Fields
SMIF_Type * base
cyhal_resource_inst_t resource
cyhal_gpio_t pin_ios[8]
cyhal_gpio_t pin_sclk
cyhal_gpio_t pin_ssel
uint32_t frequency
uint8_t mode
cy_stc_smif_context_t context
cy_en_smif_slave_select_t slave_select
cy_en_smif_data_select_t data_select
uint32_t irq_cause
cyhal_event_callback_data_t callback_data

◆ cyhal_trng_t

struct cyhal_trng_t
Data Fields
CRYPTO_Type * base
cyhal_resource_inst_t resource

◆ cyhal_rtc_t

struct cyhal_rtc_t
Data Fields
uint8_t placeholder

◆ cyhal_sdhc_t

struct cyhal_sdhc_t
Data Fields
SDHC_Type * base
cyhal_resource_inst_t resource
bool emmc
cy_en_sd_host_dma_type_t dmaType
bool enableLedControl
cy_stc_sd_host_context_t context
cyhal_gpio_t pin_clk
cyhal_gpio_t pin_cmd
cyhal_gpio_t pin_data[8]
cyhal_gpio_t pin_cardDetect
cyhal_gpio_t pin_ioVoltSel
cyhal_gpio_t pin_cardIfPwrEn
cyhal_gpio_t pin_cardMechWriteProt
cyhal_gpio_t pin_ledCtrl
cyhal_gpio_t pin_cardEmmcReset
uint32_t irq_cause
cyhal_event_callback_data_t callback_data

◆ cyhal_sdio_t

struct cyhal_sdio_t
Data Fields
SDHC_Type * base
cyhal_resource_inst_t resource
bool emmc
cy_en_sd_host_dma_type_t dmaType
cy_stc_sd_host_context_t context
cyhal_gpio_t pin_clk
cyhal_gpio_t pin_cmd
cyhal_gpio_t pin_data0
cyhal_gpio_t pin_data1
cyhal_gpio_t pin_data2
cyhal_gpio_t pin_data3
uint32_t frequencyhal_hz
uint16_t block_size
uint32_t irq_cause
cy_stc_syspm_callback_params_t pm_params
cy_stc_syspm_callback_t pm_callback
uint32_t events
cyhal_event_callback_data_t callback_data

◆ cyhal_spi_t

struct cyhal_spi_t
Data Fields
CySCB_Type * base
cyhal_resource_inst_t resource
cyhal_gpio_t pin_miso
cyhal_gpio_t pin_mosi
cyhal_gpio_t pin_sclk
cyhal_gpio_t pin_ssel
cyhal_clock_divider_t clock
cy_en_scb_spi_sclk_mode_t clk_mode
uint8_t mode
uint8_t data_bits
bool is_slave
bool alloc_clock
uint8_t oversample_value
bool msb_first
cy_stc_scb_spi_context_t context
uint32_t irq_cause
uint16_t pending
void * rx_buffer
uint32_t rx_buffer_size
const void * tx_buffer
uint32_t tx_buffer_size
bool is_async
cyhal_event_callback_data_t callback_data

◆ cyhal_timer_t

struct cyhal_timer_t
Data Fields
TCPWM_Type * base
cyhal_resource_inst_t resource
cyhal_gpio_t pin
cyhal_clock_divider_t clock
bool dedicated_clock
uint32_t clock_hz
uint8_t direction
bool is_continuous
bool is_compare
cyhal_event_callback_data_t callback_data

◆ cyhal_uart_t

struct cyhal_uart_t
Data Fields
CySCB_Type * base
cyhal_resource_inst_t resource
cyhal_gpio_t pin_rx
cyhal_gpio_t pin_tx
cyhal_gpio_t pin_cts
cyhal_gpio_t pin_rts
bool is_user_clock
cyhal_clock_divider_t clock
cy_stc_scb_uart_context_t context
cy_stc_scb_uart_config_t config
uint32_t irq_cause
cy_stc_syspm_callback_params_t pm_params
cy_stc_syspm_callback_t pm_callback
en_hsiom_sel_t saved_tx_hsiom
en_hsiom_sel_t saved_rts_hsiom
cyhal_event_callback_data_t callback_data

◆ cyhal_usb_dev_t

struct cyhal_usb_dev_t
Data Fields
USBFS_Type * base
cy_stc_usbfs_dev_drv_context_t context
cyhal_resource_inst_t resource
cyhal_resource_inst_t pll_resource
cyhal_clock_divider_t clock
bool shared_clock
cyhal_gpio_t pin_dp
cyhal_gpio_t pin_dm
uint8_t * rd_data[CY_USBFS_DEV_DRV_NUM_EPS_MAX]
uint32_t rd_size[CY_USBFS_DEV_DRV_NUM_EPS_MAX]

◆ cyhal_wdt_t

struct cyhal_wdt_t
Data Fields
uint8_t placeholder

Macro Definition Documentation

◆ CYHAL_ISR_PRIORITY_DEFAULT

#define CYHAL_ISR_PRIORITY_DEFAULT   (7)

Default priority for interrupts

◆ cyhal_system_callback_t

#define cyhal_system_callback_t   cy_stc_syspm_callback_t

Callbacks for Sleep and Deepsleep APIs

Typedef Documentation

◆ cyhal_clock_divider_types_t

typedef cy_en_divider_types_t cyhal_clock_divider_types_t

Available clock divider types

◆ cyhal_system_divider_t

typedef uint16_t cyhal_system_divider_t

Divider for CM4, CM0 and Peri clock. Supports values between [1, 256]

Enumeration Type Documentation

◆ cyhal_resource_t

Resource types that the hardware manager supports

Enumerator
CYHAL_RSC_ADC 

Analog to digital converter

CYHAL_RSC_BLESS 

Bluetooth communications block

CYHAL_RSC_CAN 

CAN communication block

CYHAL_RSC_CLKPATH 

System clock clock path, used to drive hfclks

CYHAL_RSC_CLOCK 

Clock divider

CYHAL_RSC_CRYPTO 

Crypto hardware accelerator

CYHAL_RSC_DAC 

Digital to analog converter

CYHAL_RSC_DMA 

DMA controller

CYHAL_RSC_GPIO 

General purpose I/O pin

CYHAL_RSC_I2S 

I2S communications block

CYHAL_RSC_LCD 

Segment LCD controller

CYHAL_RSC_LPCOMP 

Low power comparator

CYHAL_RSC_LPTIMER 

Low power timer

CYHAL_RSC_OPAMP 

Opamp

CYHAL_RSC_PDM 

PCM/PDM communications block

CYHAL_RSC_SMIF 

Quad-SPI communications block

CYHAL_RSC_RTC 

Real time clock

CYHAL_RSC_SCB 

Serial Communications Block

CYHAL_RSC_SDHC 

SD Host Controller

CYHAL_RSC_TCPWM 

Timer/Counter/PWM block

CYHAL_RSC_UDB 

UDB Array

CYHAL_RSC_USB 

USB communication block

CYHAL_RSC_INVALID 

Placeholder for invalid type

◆ cyhal_system_clock_t

Enum for clock type to configure. HFCLKs are configured using different APIs and does not using this enum