Infineon PSoC 6 Getting Started page 32

Hide thumbs Also See for PSoC 6:
Table of Contents

Advertisement

Getting started with PSoC
4 My first PSoC
6 MCU design using PSoC
for(;;)
{
if(LEDupdateFlag)
{
/* Clear the flag */
LEDupdateFlag
/* Invert the LED state*/
Cy_GPIO_Inv(Pin_GreenLED_0_PORT, Pin_GreenLED_0_NUM);
}
}
}
/********************************************************************
* Function Name: UartInit
*********************************************************************/
void
UartInit(void)
{
/* Configure the UART peripheral.
UART_config structure is defined by the UART_PDL component based on
parameters entered in the Component configuration*/
Cy_SCB_UART_Init(UART_HW, &UART_config, &UART_context);
/* Enable the UART peripheral */
Cy_SCB_UART_Enable(UART_HW);
}
/********************************************************************
* Function Name: TimerInit
*********************************************************************/
void
TimerInit(void)
{
/* Configure the TCPWM peripheral.
Counter_config structure is defined based on the parameters entered
in the Component configuration */
Cy_TCPWM_Counter_Init(Timer_HW, Timer_CNT_NUM, &Timer_config);
/* Enable the initialized counter */
Cy_TCPWM_Counter_Enable(Timer_HW, Timer_CNT_NUM);
/* Start the enabled counter */
Cy_TCPWM_TriggerStart(Timer_HW, Timer_CNT_MASK);
/* Configure the ISR for the TCPWM peripheral*/
Cy_SysInt_Init(&Isr_Timer_cfg, Isr_Timer);
/* Enable interrupt in NVIC */
NVIC_EnableIRQ((IRQn_Type)Isr_Timer_cfg.intrSrc);
}
/********************************************************************
* Function Name: Isr_Timer
*********************************************************************/
Application Note
6 MCU on PSoC
Creator
=
false;
Creator
32
002-21774 Rev. *G
2022-07-21

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the PSoC 6 and is the answer not in the manual?

Questions and answers

Table of Contents