Hardware Abstraction Layer (HAL)
4390X Specific Hardware Types

General Description

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

API Reference

 Group_hal_ethernet_header
 Some Ethernet Header types (see IEEE 802.3 for full list)
 

Data Structures

struct  cyhal_clock_t
 Clock object Application code should not rely on the specific contents of this struct. More...
 
struct  cyhal_resource_inst_t
 Represents a particular instance of a resource on the chip. More...
 
struct  cyhal_ether_addr_t
 Ethernet MAC address (standard 6-byte (octet) MAC address) More...
 
struct  cyhal_event_callback_data_t
 Event callback data object. More...
 
struct  cyhal_dma_t
 DMA object. More...
 
struct  _cyhal_ethernet_info_t
 Ethernet Info Application code should not rely on the specific contents of this struct. More...
 
struct  cyhal_ethernet_t
 Ethernet object. More...
 
struct  cyhal_i2c_t
 I2C object. More...
 
struct  cyhal_lptimer_t
 LPTIMER object. More...
 
struct  cyhal_m2m_t
 M2M object. More...
 
struct  cyhal_pwm_t
 PWM object. More...
 
struct  cyhal_rtc_t
 RTC 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_wdt_t
 WDT object. More...
 

Macros

#define CYHAL_API_VERSION   (2)
 Macro specifying the major version number of the HAL API. More...
 
#define CYHAL_ISR_PRIORITY_DEFAULT   (3)
 Priority that is applied by default to all drivers when initialized. More...
 
#define _CYHAL_ETHERNET_CLOCK_BLOCK   CYHAL_CLOCK_BLOCK_BACKPLANE
 Clock block.
 
#define _CYHAL_ETHERNET_CLOCK_CHANNEL   0
 Clock channel.
 

Typedefs

typedef void(* cy_israddress) (void)
 Type of ISR callbacks.
 
typedef void cyhal_dma_configurator_t
 DWM configurator struct. More...
 
typedef void cyhal_i2c_configurator_t
 I2C configurator struct. More...
 
typedef void cyhal_pwm_configurator_t
 PWM configurator struct. More...
 
typedef void cyhal_rtc_configurator_t
 RTC configurator struct. More...
 
typedef void cyhal_spi_configurator_t
 SPI configurator struct. More...
 
typedef void cyhal_timer_configurator_t
 Timer configurator struct. More...
 
typedef void cyhal_uart_configurator_t
 UART configurator struct. More...
 
typedef void cyhal_ethernet_configurator_t
 Ethernet configurator struct. More...
 

Enumerations

enum  cyhal_resource_t {
  CYHAL_RSC_CLOCK ,
  CYHAL_RSC_CRYPTO ,
  CYHAL_RSC_DMA ,
  CYHAL_RSC_ETHERNET ,
  CYHAL_RSC_GPIO ,
  CYHAL_RSC_I2C ,
  CYHAL_RSC_I2S ,
  CYHAL_RSC_LPTIMER ,
  CYHAL_RSC_PWM ,
  CYHAL_RSC_QSPI ,
  CYHAL_RSC_RTC ,
  CYHAL_RSC_SDIO ,
  CYHAL_RSC_SPI ,
  CYHAL_RSC_TIMER ,
  CYHAL_RSC_UART ,
  CYHAL_RSC_USB ,
  CYHAL_RSC_INVALID
}
 Resource types that the hardware manager supports. More...
 
enum  cyhal_clock_block_t {
  CYHAL_CLOCK_BLOCK_ALP ,
  CYHAL_CLOCK_BLOCK_HT ,
  CYHAL_CLOCK_BLOCK_ILP ,
  CYHAL_CLOCK_BLOCK_LPO ,
  CYHAL_CLOCK_BLOCK_XTAL ,
  CYHAL_CLOCK_BLOCK_BB_PLL ,
  CYHAL_CLOCK_BLOCK_AUDIO_PLL ,
  CYHAL_CLOCK_BLOCK_USB_PLL ,
  CYHAL_CLOCK_BLOCK_HSIC_PLL ,
  CYHAL_CLOCK_BLOCK_WLAN_PLL ,
  CYHAL_CLOCK_BLOCK_CPU ,
  CYHAL_CLOCK_BLOCK_BACKPLANE ,
  CYHAL_CLOCK_BLOCK_FAST_UART
}
 Enum for the different types of clocks that exist on the device.
 
#define CYHAL_DRIVER_AVAILABLE_CLOCK   (1)
 Macro specifying whether the Clock driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_COMP   (0)
 Macro specifying whether the COMP driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_CRC   (0)
 Macro specifying whether the CRC driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_DAC   (0)
 Macro specifying whether the DAC driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_DMA   (1)
 Macro specifying whether the DMA driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_ETHERNET   (1)
 Macro specifying whether the Ethernet driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_EZI2C   (0)
 Macro specifying whether the EzI2C driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_NVM   (0)
 Macro specifying whether the NVM driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_FLASH   (0) /* Deprecated */
 Deprecated. More...
 
#define CYHAL_DRIVER_AVAILABLE_GPIO   (1)
 Macro specifying whether the GPIO driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_HWMGR   (1)
 Macro specifying whether the HwMgr driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_I2C   (1)
 Macro specifying whether the I2C driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_I2S   (0)
 Macro specifying whether the I2S driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_I2S_TX   (0)
 Macro specifying whether the TX functionality is available on the I2S driver for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_I2S_RX   (0)
 Macro specifying whether the RX functionality is available on the I2S driver for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_INTERCONNECT   (0)
 Macro specifying whether the Interconnect driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_KEYSCAN   (0)
 Macro specifying whether the KeyScan driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_LPTIMER   (1)
 Macro specifying whether the LPTimer driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_OPAMP   (0)
 Macro specifying whether the OpAmp driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_PDMPCM   (0)
 Macro specifying whether the PDM/PCM driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_PWM   (1)
 Macro specifying whether the PWM driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_QSPI   (0)
 Macro specifying whether the QSPI driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_QUADDEC   (0)
 Macro specifying whether the QuadDec driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_RTC   (0)
 Macro specifying whether the RTC driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_SDHC   (0)
 Macro specifying whether the SDHC driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_SDIO   (0)
 Macro specifying whether the SDIO driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_SDIO_HOST   (0)
 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_SPI   (0)
 Macro specifying whether the SPI driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_SYSPM   (1)
 Macro specifying whether the SysPM 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_TDM   (0)
 Macro specifying whether the TDM driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_TDM_TX   (0)
 Macro specifying whether the TX functionality is available on the TDM driver for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_TDM_RX   (0)
 Macro specifying whether the RX functionality is available on the TDM driver for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_TIMER   (1)
 Macro specifying whether the Timer driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_TRNG   (0)
 Macro specifying whether the TRNG driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_UART   (1)
 Macro specifying whether the UART driver is available for the current device.
 
#define CYHAL_DRIVER_AVAILABLE_USB_DEV   (0)
 Macro specifying whether the USB Dev 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_IPC   (0)
 Macro specifying whether the IPC driver is available for the current device.
 

Data Structure Documentation

◆ cyhal_clock_t

struct cyhal_clock_t
Data Fields
cyhal_clock_block_t block
uint8_t channel
bool reserved

◆ 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_ether_addr_t

struct cyhal_ether_addr_t
Data Fields
uint8_t octet[CYHAL_ETHER_ADDR_LEN] 48-bit Ethernet address

◆ cyhal_event_callback_data_t

struct cyhal_event_callback_data_t
Data Fields
cy_israddress callback
void * callback_arg

◆ cyhal_dma_t

struct cyhal_dma_t
Data Fields
cyhal_resource_inst_t resource
uint8_t tx_ch
uint8_t rx_ch
uint8_t dma_ch
uint8_t group
uint32_t src_addr
uint32_t dst_addr
uint32_t bytes
uint32_t direction
bool tx_started
bool is_enabled
cyhal_event_callback_data_t callback_data

◆ _cyhal_ethernet_info_t

struct _cyhal_ethernet_info_t
Data Fields
void * etc Ethernet Common data.
cyhal_ether_addr_t mac_address Ethernet MAC address.
uint32_t watchdog_events Ethernet Events since last watchdog call.
bool started Indicates that Ethernet has started.

◆ cyhal_ethernet_t

struct cyhal_ethernet_t
Data Fields
uint32_t tag If == CYHAL_ETHERNET_OBJ_TAG, indicates object is initialized.
bool network_up Indicates if network is up true = network is up false = network is down
uint32_t events_from_GMAC_irq IRQ from GMAC informs us of interrupts.
void * user_callback User callback function.
void * user_data Argument to be passed back to the user while invoking the callback.
uint32_t event_req User callback function event requests.
uint8_t intr_priority User callback function interrupt priority.
cyhal_clock_t clk Ethernet Clock.
_cyhal_ethernet_info_t et_info Platform dependent Ethernet Info.

◆ cyhal_i2c_t

struct cyhal_i2c_t
Data Fields
cyhal_resource_inst_t resource
cyhal_gpio_t pin_sda
cyhal_gpio_t pin_scl
cyhal_event_callback_data_t callback_data

◆ cyhal_lptimer_t

struct cyhal_lptimer_t
Data Fields
cyhal_resource_inst_t resource
bool started
bool matching
uint32_t reset_ticks
bool compare_event_enabled
cyhal_event_callback_data_t callback_data

◆ cyhal_m2m_t

struct cyhal_m2m_t
Data Fields
cyhal_dma_t * dma_obj

◆ cyhal_pwm_t

struct cyhal_pwm_t
Data Fields
cyhal_resource_inst_t resource
cyhal_resource_inst_t compl_resource
cyhal_gpio_t pin
cyhal_gpio_t compl_pin
uint32_t dead_time_us
bool is_enabled

◆ cyhal_rtc_t

struct cyhal_rtc_t
Data Fields
void * empty

◆ cyhal_spi_t

struct cyhal_spi_t
Data Fields
cyhal_resource_inst_t resource
cyhal_gpio_t pin_mosi
cyhal_gpio_t pin_miso
cyhal_gpio_t pin_clk
cyhal_gpio_t pin_cs
uint32_t numDataBytes
cyhal_event_callback_data_t callback_data

◆ cyhal_timer_t

struct cyhal_timer_t
Data Fields
cyhal_resource_inst_t resource
bool running
bool ever_stopped
bool in_compare_phase
bool is_continuous
uint32_t freq_ratio
uint32_t max_fw_ticks
uint32_t fw_start_ticks
uint32_t fw_ticks_to_compare
uint32_t fw_tick_period
uint32_t hw_ticks_to_compare
uint32_t hw_ticks_to_terminal
uint32_t previous_stop_hw_ticks
bool compare_event_enabled
bool terminal_event_enabled
cyhal_event_callback_data_t callback_data

◆ cyhal_uart_t

struct cyhal_uart_t
Data Fields
cyhal_resource_inst_t resource
cyhal_gpio_t pin_rx
cyhal_gpio_t pin_tx
cyhal_gpio_t pin_rts
bool enable_rts
cyhal_gpio_t pin_cts
bool enable_cts
cyhal_clock_t clk
wiced_ring_buffer_t buffer
uint32_t user_enabled_events
uint16_t user_rx_trigger_level
uint16_t user_tx_trigger_level
volatile const void * async_tx_buff
volatile size_t async_tx_length
volatile void * async_rx_buff
volatile size_t async_rx_length
cyhal_event_callback_data_t callback_data

◆ cyhal_wdt_t

struct cyhal_wdt_t
Data Fields
void * empty

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   (0) /* Deprecated */

Deprecated.

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

◆ CYHAL_ISR_PRIORITY_DEFAULT

#define CYHAL_ISR_PRIORITY_DEFAULT   (3)

Priority that is applied by default to all drivers when initialized.

Priorities can be overridden on each driver as part of enabling events.

Typedef Documentation

◆ cyhal_dma_configurator_t

DWM configurator struct.

43907 does not support configurators, so this is a stub data type.

◆ cyhal_i2c_configurator_t

I2C configurator struct.

43907 does not support configurators, so this is a stub data type.

◆ cyhal_pwm_configurator_t

PWM configurator struct.

43907 does not support configurators, so this is a stub data type.

◆ cyhal_rtc_configurator_t

RTC configurator struct.

43907 does not support configurators, so this is a stub data type.

◆ cyhal_spi_configurator_t

SPI configurator struct.

43907 does not support configurators, so this is a stub data type.

◆ cyhal_timer_configurator_t

Timer configurator struct.

43907 does not support configurators, so this is a stub data type.

◆ cyhal_uart_configurator_t

UART configurator struct.

43907 does not support configurators, so this is a stub data type.

◆ cyhal_ethernet_configurator_t

Ethernet configurator struct.

43907 does not support configurators, so this is a stub data type.

Enumeration Type Documentation

◆ cyhal_resource_t

Resource types that the hardware manager supports.

Enumerator
CYHAL_RSC_CLOCK 

Clock

CYHAL_RSC_CRYPTO 

Crypto

CYHAL_RSC_DMA 

DMA

CYHAL_RSC_ETHERNET 

Ethernet block

CYHAL_RSC_GPIO 

General purpose I/O pin

CYHAL_RSC_I2C 

I2C block

CYHAL_RSC_I2S 

I2S block

CYHAL_RSC_LPTIMER 

Low power timer

CYHAL_RSC_PWM 

PWM block

CYHAL_RSC_QSPI 

QSPI block

CYHAL_RSC_RTC 

RTC block

CYHAL_RSC_SDIO 

SDIO block

CYHAL_RSC_SPI 

SPI block

CYHAL_RSC_TIMER 

Timer

CYHAL_RSC_UART 

UART block

CYHAL_RSC_USB 

USB block

CYHAL_RSC_INVALID 

Placeholder for invalid type