PSoC 6 Peripheral Driver Library
Initialization Functions

General Description

Functions

cy_en_smartio_status_t Cy_SmartIO_Init (SMARTIO_PRT_Type *base, const cy_stc_smartio_config_t *config)
 Initializes the Smart I/O. More...
 
void Cy_SmartIO_Deinit (SMARTIO_PRT_Type *base)
 Resets the Smart I/O to default values. More...
 
void Cy_SmartIO_Enable (SMARTIO_PRT_Type *base)
 Enables the Smart I/O. More...
 
void Cy_SmartIO_Disable (SMARTIO_PRT_Type *base)
 Disables the Smart I/O. More...
 

Function Documentation

◆ Cy_SmartIO_Init()

cy_en_smartio_status_t Cy_SmartIO_Init ( SMARTIO_PRT_Type *  base,
const cy_stc_smartio_config_t config 
)

Initializes the Smart I/O.

Parameters
basePointer to the Smart I/O base address
configPointer to the Smart I/O configuration structure
Returns
Status of the initialization operation
Function Usage
#define ioss_0_port_8_smartio_0_HW SMARTIO_PRT8
const cy_stc_smartio_lutcfg_t ioss_0_port_8_smartio_0_lutCfg0 =
{
.lutMap = 1u,
};
const cy_stc_smartio_config_t ioss_0_port_8_smartio_0_config =
{
.ioSyncEn = 0u|0u|0u|0u|0u|0u|0u|0u,
.chipSyncEn = 0u|0u|0u|0u|0u|0u|0u|0u,
.lutCfg0 = &ioss_0_port_8_smartio_0_lutCfg0,
.lutCfg1 = NULL,
.lutCfg2 = NULL,
.lutCfg3 = NULL,
.lutCfg4 = NULL,
.lutCfg5 = NULL,
.lutCfg6 = NULL,
.lutCfg7 = NULL,
.duCfg = NULL,
.hldOvr = false,
};
/* Scenario: Initialize Smart I/O block 8 to invert the input signal on pin 0
and drive it back out to pin 1. GPIO P8.0 and P8.1 are already configured to
be digital input and digital output respectively. */
/* Configure the CM0+ bus master - privileged, secure, allow setting PC to PC=1 and PC=2 */
if(CY_SMARTIO_SUCCESS != Cy_SmartIO_Init(SMARTIO_PRT8, &ioss_0_port_8_smartio_0_config))
{
/* Insert error handling */
}
/* Enable Smart I/O block 8 */
Cy_SmartIO_Enable(SMARTIO_PRT8);

◆ Cy_SmartIO_Deinit()

void Cy_SmartIO_Deinit ( SMARTIO_PRT_Type *  base)

Resets the Smart I/O to default values.

Parameters
basePointer to the Smart I/O base address
Function Usage
#define ioss_0_port_8_smartio_0_HW SMARTIO_PRT8
/* Scenario: Smart I/O block 8 configuration needs to be reverted to its
default values. */
Cy_SmartIO_Disable(SMARTIO_PRT8);
Cy_SmartIO_Deinit(SMARTIO_PRT8);

◆ Cy_SmartIO_Enable()

void Cy_SmartIO_Enable ( SMARTIO_PRT_Type *  base)

Enables the Smart I/O.

Parameters
basePointer to the Smart I/O base address
Function Usage
/* Refer to the Cy_SmartIO_Init() function usage example */

◆ Cy_SmartIO_Disable()

void Cy_SmartIO_Disable ( SMARTIO_PRT_Type *  base)

Disables the Smart I/O.

Parameters
basePointer to the Smart I/O base address
Function Usage
#define ioss_0_port_8_smartio_0_HW SMARTIO_PRT8
/* Scenario: Smart I/O block 8 needs to be reconfigured to be driven by the
low-frequency clock. It must first be disabled, reconfigured and enabled. */
Cy_SmartIO_Disable(SMARTIO_PRT8);
Cy_SmartIO_Enable(SMARTIO_PRT8);