High level interface to the Infineon digital routing.
Facilities for runtime manipulation of the on chip routing. The following types of connections are supported:
The following code snippet demonstrates connecting a GPIO pin to an active TCPWM block on a device using the cyhal_connect_pin. It is assumed that the TCPWM is already configured and active.
The following code snippet demonstrates configuring and connecting a Timer which will overflow every 2 seconds and, in doing so, trigger a DMA channel start.
API Reference | |
Interconnect HAL Results | |
Interconnect specific return codes. | |
Functions | |
cy_rslt_t | cyhal_connect_pin (const cyhal_resource_pin_mapping_t *pin_connection, uint8_t drive_mode) |
Connect a pin to a peripheral terminal. More... | |
cy_rslt_t | cyhal_disconnect_pin (cyhal_gpio_t pin) |
Disconnect a peripheral from a pin. More... | |
cy_rslt_t cyhal_connect_pin | ( | const cyhal_resource_pin_mapping_t * | pin_connection, |
uint8_t | drive_mode | ||
) |
Connect a pin to a peripheral terminal.
This will route a direct connection from the pin to the peripheral. Any previous direct connection from the pin will be overriden.
See Snippet 1: Connecting a pin to TCPWM block
[in] | pin_connection | The pin and target peripheral terminal to be connected |
[in] | drive_mode | The drive mode to use for the pin |
cy_rslt_t cyhal_disconnect_pin | ( | cyhal_gpio_t | pin | ) |
Disconnect a peripheral from a pin.
This will also reset the pin's drive mode to High-Z.
[in] | pin | The pin to be disconnected |