PSoC 6 Hardware Abstraction Layer (HAL)
INTERCONNECT (Internal digital routing)

General Description

High level interface for interacting with the Cypress digital routing.

This provides limited facilities for runtime manipulation of the on chip routing. The following types of connections are supported:

Macros

#define CYHAL_CONNECT_RSLT_NO_CONNECTION   (CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CYHAL_RSLT_MODULE_INTERCONNECT, 0))
 
#define CYHAL_CONNECT_RSLT_ALREADY_CONNECTED   (CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CYHAL_RSLT_MODULE_INTERCONNECT, 1))
 
#define CYHAL_CONNECT_RSLT_INVALID_TRIGGER_CONNECTION   (CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CYHAL_RSLT_MODULE_INTERCONNECT, 2))
 
#define CYHAL_INTERCONNECT_MUX_NOT_CONTINUATION   0xFF
 

Functions

cy_rslt_t cyhal_connect_pin (const cyhal_resource_pin_mapping_t *pin_connection)
 
cy_rslt_t cyhal_disconnect_pin (cyhal_gpio_t pin)
 
cy_rslt_t cyhal_connect_trigger (cyhal_source_t source, cyhal_dest_t dest)
 

Macro Definition Documentation

◆ CYHAL_CONNECT_RSLT_NO_CONNECTION

#define CYHAL_CONNECT_RSLT_NO_CONNECTION   (CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CYHAL_RSLT_MODULE_INTERCONNECT, 0))

No connection is available

◆ CYHAL_CONNECT_RSLT_ALREADY_CONNECTED

#define CYHAL_CONNECT_RSLT_ALREADY_CONNECTED   (CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CYHAL_RSLT_MODULE_INTERCONNECT, 1))

The connections source and destination are already connected

◆ CYHAL_CONNECT_RSLT_INVALID_TRIGGER_CONNECTION

#define CYHAL_CONNECT_RSLT_INVALID_TRIGGER_CONNECTION   (CY_RSLT_CREATE(CY_RSLT_TYPE_ERROR, CYHAL_RSLT_MODULE_INTERCONNECT, 2))

Invalid trigger connection

◆ CYHAL_INTERCONNECT_MUX_NOT_CONTINUATION

#define CYHAL_INTERCONNECT_MUX_NOT_CONTINUATION   0xFF

Indicates that a mux output does not continue to another mux

Function Documentation

◆ cyhal_connect_pin()

cy_rslt_t cyhal_connect_pin ( const cyhal_resource_pin_mapping_t *  pin_connection)

Connect a pin to a peripheral terminal. This will route a direct connect from the pin to the peripheral. Any previous direct connection from the pin will be overriden.

Parameters
[in]pin_connectionDetails about the pin and its target connection
Returns
The status of the connect request

◆ cyhal_disconnect_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.

Parameters
[in]pinThe pin to disconnect
Returns
The status of the disconnect request

◆ cyhal_connect_trigger()

cy_rslt_t cyhal_connect_trigger ( cyhal_source_t  source,
cyhal_dest_t  dest 
)

WORK IN PROGRESS. This function is not yet fully implemented. Connects two digital terminals on the device using any internal interconnect. As expected, a single source can drive multiple destinations, but a destination can only be driven by a single source. If the output is already connected, or the connection can not be established an error will be returned.

Parameters
[in]sourceThe source of the signal to connect
[in]destThe destination of the signal to connect
Returns
The status of the connect request