PSOC E8XXGP Device Support Library

| PSOC E8XXGP Device Support Library

API Reference | Macros
Implementation Specific
HAL API Reference

## General Description

This section provides details about the implementation of the Infineon HAL.

All information within this section is platform specific and is provided for reference. Portable application code should depend only on the APIs and types which are documented in the HAL Drivers section.

# HAL Resource Hardware Mapping

The following table shows a mapping of each HAL driver to the lower level firmware driver and the corresponding hardware resource. This is intended to help understand how the HAL is implemented and what features the underlying hardware supports.

HAL Resource | PDL Driver(s) | Hardware
--- | --- | ---
ADC | cy_adc | SAR ADC
Clock | cy_sysclk | All clocks (system & peripheral)
Comparator | cy_ctb or cy_lpcomp | CTBm or LPComp
DMA | cy_dma, cy_dmac | DMA Controller
NVM | cy_flash | Flash
GPIO | cy_gpio | GPIO
I2C | cy_scb_i2c | SCB
LPTimer | cy_mcwdt | MCWDT
PWM | cy_pwm | TCPWM
MemorySPI | cy_smif | MemorySPI (SMIF)
RTC | cy_rtc | RTC
SDHC | cy_sd_host | SD Host
SDIO | cy_sd_host, or NA | SD Host, or UDB
SPI | cy_scb_spi | SCB
SysPM | cy_syspm | System Power Resources
System | cy_syslib | System Resources
Timer | cy_tcpwm_counter | TCPWM
TRNG | cy_crypto_core_trng | Crypto
UART | cy_scb_uart | SCB

# Device Specific Errors

Error codes generated by the low level level PDL driver all use module IDs starting with CY_RSLT_MODULE_DRIVERS_PDL_BASE. The exact errors are documented for each driver in the mtb-pdl-cat1 documentation.

## API Reference
| DMA (Direct Memory Access)
| DW (DataWire) is one of two DMA hardware implementations.
| Specific Hardware Types
| Aliases for types which are part of the public HAL interface but whose representations need to vary per HAL implementation.
| LPTimer (Low-Power Timer)
| The maximum number of ticks that can set to an LPTimer is 0xFFF0FFFF.
| System Power Management
| The Power Management has the following characteristics: MTB_HAL_SYSPM_CB_SYSTEM_HIGH equates to the High Power mode MTB_HAL_SYSPM_CB_SYSTEM_NORMAL equates to the Low Power mode MTB_HAL_SYSPM_CB_SYSTEM_LOW equates to the Ultra Low Power mode.
| TRNG (True Random Number Generator)
| Initialization polynomial values for the True Random Number Generator.
| MemorySPI (Memory Serial Peripheral Interface)
| NVM (Onboard Non-Volatile Memory)
| File Name: mtb_hal_nvm_mxs22rramc.c.
| RTC (Real Time Clock)
| Internally the RTC only stores the year as a two digit BCD value (0-99); no century information is stored.
| SDHC (SD Host Controller)
| The PDL has the following weak functions to support the use of dedicated pins for card detect, write protect, pwr en, and io select signals.
| SPI (Serial Peripheral Interface)

## Macros
#define | MTB_HAL_API_VERSION (3)
| Macro specifying the major version number of the HAL API. More...

## Macro Definition Documentation

## ◆ MTB_HAL_API_VERSION

#define MTB_HAL_API_VERSION (3)

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 MTB_HAL_DRIVER_AVAILABLE_X macros defined in HAL Driver Availability should be used.