EasyManua.ls Logo

Infineon AN230264 - Peripheral Drivers

Infineon AN230264
39 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Code Listing 2 Sample code for CM0+ main function
include "cy_project.h"
#include "cy_device_headers.h“
#define USER_LED_PORT CY_USER_LED1_PORT
#define USER_LED_PIN CY_USER_LED1_PIN
#define USER_LED_PIN_MUX CY_USER_LED1_PIN_MUX
/******************************************************************************
* GPIO pins configuration
******************************************************************************/
cy_stc_gpio_pin_config_t user_led_port_pin_cfg =
{
.outVal = 0x00,
.driveMode = CY_GPIO_DM_PULLUP,
.hsiom = USER_LED_PIN_MUX,
.intEdge = 0,
.intMask = 0,
.vregEn = 0,
.ibufMode = 0,
.vtripSel = 0,
.vrefSel = 0,
.vohSel = 0,
};
int main(void)
{
SystemInit(); /* Initialize system. */
__enable_irq(); /* Enable global interrupts. */
/* Initialization/startup code */
Cy_GPIO_Pin_Init(USER_LED_PORT, USER_LED_PIN, &user_led_port_pin_cfg);
for(;;)
{
Cy_SysTick_DelayInUs(50000); /* Wait 0.05 [s] */
Cy_GPIO_Inv(USER_LED_PORT, USER_LED_PIN); /* Invert LED port */
}
}
3.3 Peripheral drivers
Peripheral drivers are a set of firmware drivers that provide APIs for accessing hardware. These APIs perform
initialization and control activities of each peripheral.
Table 2 lists the peripheral drivers that Infineon provides for SDL, and Table 3 lists the device-specific
middleware.
Table 2 Peripheral drivers list
No. Driver Description API functionality
1 ADC Analog to Digital Converter
(PACSS)
Manage ADC operations
(table continues...)
Getting started with PSoC
HV PA family
3 Development environment and tools
Application note 17 002-30264 Rev. *B
2023-04-19

Related product manuals