/******************************************************************************* * File Name: cycfg_pins.c * * Description: * Pin configuration * This file was automatically generated and should not be modified. * Configurator Backend 3.0.0 * device-db 4.3.0.3855 * mtb-pdl-cat1 3.4.0.24948 * ******************************************************************************** * Copyright 2023 Cypress Semiconductor Corporation (an Infineon company) or * an affiliate of Cypress Semiconductor Corporation. * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. ********************************************************************************/ #include "cycfg_pins.h" const cy_stc_gpio_pin_config_t CYBSP_SWDIO_config = { .outVal = 1, .driveMode = CY_GPIO_DM_PULLUP, .hsiom = CYBSP_SWDIO_HSIOM, .intEdge = CY_GPIO_INTR_DISABLE, .intMask = 0UL, .vtrip = CY_GPIO_VTRIP_CMOS, .slewRate = CY_GPIO_SLEW_FAST, .driveSel = CY_GPIO_DRIVE_1_2, .vregEn = 0UL, .ibufMode = 0UL, .vtripSel = 0UL, .vrefSel = 0UL, .vohSel = 0UL, }; #if defined (CY_USING_HAL) const cyhal_resource_inst_t CYBSP_SWDIO_obj = { .type = CYHAL_RSC_GPIO, .block_num = CYBSP_SWDIO_PORT_NUM, .channel_num = CYBSP_SWDIO_PIN, }; #endif //defined (CY_USING_HAL) const cy_stc_gpio_pin_config_t CYBSP_SWDCK_config = { .outVal = 1, .driveMode = CY_GPIO_DM_PULLDOWN, .hsiom = CYBSP_SWDCK_HSIOM, .intEdge = CY_GPIO_INTR_DISABLE, .intMask = 0UL, .vtrip = CY_GPIO_VTRIP_CMOS, .slewRate = CY_GPIO_SLEW_FAST, .driveSel = CY_GPIO_DRIVE_1_2, .vregEn = 0UL, .ibufMode = 0UL, .vtripSel = 0UL, .vrefSel = 0UL, .vohSel = 0UL, }; #if defined (CY_USING_HAL) const cyhal_resource_inst_t CYBSP_SWDCK_obj = { .type = CYHAL_RSC_GPIO, .block_num = CYBSP_SWDCK_PORT_NUM, .channel_num = CYBSP_SWDCK_PIN, }; #endif //defined (CY_USING_HAL) const cy_stc_gpio_pin_config_t CYBSP_CINA_config = { .outVal = 1, .driveMode = CY_GPIO_DM_ANALOG, .hsiom = CYBSP_CINA_HSIOM, .intEdge = CY_GPIO_INTR_DISABLE, .intMask = 0UL, .vtrip = CY_GPIO_VTRIP_CMOS, .slewRate = CY_GPIO_SLEW_FAST, .driveSel = CY_GPIO_DRIVE_1_2, .vregEn = 0UL, .ibufMode = 0UL, .vtripSel = 0UL, .vrefSel = 0UL, .vohSel = 0UL, }; #if defined (CY_USING_HAL) const cyhal_resource_inst_t CYBSP_CINA_obj = { .type = CYHAL_RSC_GPIO, .block_num = CYBSP_CINA_PORT_NUM, .channel_num = CYBSP_CINA_PIN, }; #endif //defined (CY_USING_HAL) const cy_stc_gpio_pin_config_t CYBSP_CINB_config = { .outVal = 1, .driveMode = CY_GPIO_DM_ANALOG, .hsiom = CYBSP_CINB_HSIOM, .intEdge = CY_GPIO_INTR_DISABLE, .intMask = 0UL, .vtrip = CY_GPIO_VTRIP_CMOS, .slewRate = CY_GPIO_SLEW_FAST, .driveSel = CY_GPIO_DRIVE_1_2, .vregEn = 0UL, .ibufMode = 0UL, .vtripSel = 0UL, .vrefSel = 0UL, .vohSel = 0UL, }; #if defined (CY_USING_HAL) const cyhal_resource_inst_t CYBSP_CINB_obj = { .type = CYHAL_RSC_GPIO, .block_num = CYBSP_CINB_PORT_NUM, .channel_num = CYBSP_CINB_PIN, }; #endif //defined (CY_USING_HAL) const cy_stc_gpio_pin_config_t CYBSP_LED_RGB_BLUE_config = { .outVal = 1, .driveMode = CY_GPIO_DM_ANALOG, .hsiom = CYBSP_LED_RGB_BLUE_HSIOM, .intEdge = CY_GPIO_INTR_DISABLE, .intMask = 0UL, .vtrip = CY_GPIO_VTRIP_CMOS, .slewRate = CY_GPIO_SLEW_FAST, .driveSel = CY_GPIO_DRIVE_1_2, .vregEn = 0UL, .ibufMode = 0UL, .vtripSel = 0UL, .vrefSel = 0UL, .vohSel = 0UL, }; #if defined (CY_USING_HAL) const cyhal_resource_inst_t CYBSP_LED_RGB_BLUE_obj = { .type = CYHAL_RSC_GPIO, .block_num = CYBSP_LED_RGB_BLUE_PORT_NUM, .channel_num = CYBSP_LED_RGB_BLUE_PIN, }; #endif //defined (CY_USING_HAL) const cy_stc_gpio_pin_config_t CYBSP_CMOD_config = { .outVal = 1, .driveMode = CY_GPIO_DM_ANALOG, .hsiom = CYBSP_CMOD_HSIOM, .intEdge = CY_GPIO_INTR_DISABLE, .intMask = 0UL, .vtrip = CY_GPIO_VTRIP_CMOS, .slewRate = CY_GPIO_SLEW_FAST, .driveSel = CY_GPIO_DRIVE_1_2, .vregEn = 0UL, .ibufMode = 0UL, .vtripSel = 0UL, .vrefSel = 0UL, .vohSel = 0UL, }; #if defined (CY_USING_HAL) const cyhal_resource_inst_t CYBSP_CMOD_obj = { .type = CYHAL_RSC_GPIO, .block_num = CYBSP_CMOD_PORT_NUM, .channel_num = CYBSP_CMOD_PIN, }; #endif //defined (CY_USING_HAL) const cy_stc_gpio_pin_config_t CYBSP_CSD_BTN0_config = { .outVal = 1, .driveMode = CY_GPIO_DM_ANALOG, .hsiom = CYBSP_CSD_BTN0_HSIOM, .intEdge = CY_GPIO_INTR_DISABLE, .intMask = 0UL, .vtrip = CY_GPIO_VTRIP_CMOS, .slewRate = CY_GPIO_SLEW_FAST, .driveSel = CY_GPIO_DRIVE_1_2, .vregEn = 0UL, .ibufMode = 0UL, .vtripSel = 0UL, .vrefSel = 0UL, .vohSel = 0UL, }; #if defined (CY_USING_HAL) const cyhal_resource_inst_t CYBSP_CSD_BTN0_obj = { .type = CYHAL_RSC_GPIO, .block_num = CYBSP_CSD_BTN0_PORT_NUM, .channel_num = CYBSP_CSD_BTN0_PIN, }; #endif //defined (CY_USING_HAL) const cy_stc_gpio_pin_config_t CYBSP_A8_config = { .outVal = 1, .driveMode = CY_GPIO_DM_ANALOG, .hsiom = CYBSP_A8_HSIOM, .intEdge = CY_GPIO_INTR_DISABLE, .intMask = 0UL, .vtrip = CY_GPIO_VTRIP_CMOS, .slewRate = CY_GPIO_SLEW_FAST, .driveSel = CY_GPIO_DRIVE_1_2, .vregEn = 0UL, .ibufMode = 0UL, .vtripSel = 0UL, .vrefSel = 0UL, .vohSel = 0UL, }; #if defined (CY_USING_HAL) const cyhal_resource_inst_t CYBSP_A8_obj = { .type = CYHAL_RSC_GPIO, .block_num = CYBSP_A8_PORT_NUM, .channel_num = CYBSP_A8_PIN, }; #endif //defined (CY_USING_HAL) const cy_stc_gpio_pin_config_t CYBSP_A9_config = { .outVal = 1, .driveMode = CY_GPIO_DM_ANALOG, .hsiom = CYBSP_A9_HSIOM, .intEdge = CY_GPIO_INTR_DISABLE, .intMask = 0UL, .vtrip = CY_GPIO_VTRIP_CMOS, .slewRate = CY_GPIO_SLEW_FAST, .driveSel = CY_GPIO_DRIVE_1_2, .vregEn = 0UL, .ibufMode = 0UL, .vtripSel = 0UL, .vrefSel = 0UL, .vohSel = 0UL, }; #if defined (CY_USING_HAL) const cyhal_resource_inst_t CYBSP_A9_obj = { .type = CYHAL_RSC_GPIO, .block_num = CYBSP_A9_PORT_NUM, .channel_num = CYBSP_A9_PIN, }; #endif //defined (CY_USING_HAL) const cy_stc_gpio_pin_config_t CYBSP_A10_config = { .outVal = 1, .driveMode = CY_GPIO_DM_ANALOG, .hsiom = CYBSP_A10_HSIOM, .intEdge = CY_GPIO_INTR_DISABLE, .intMask = 0UL, .vtrip = CY_GPIO_VTRIP_CMOS, .slewRate = CY_GPIO_SLEW_FAST, .driveSel = CY_GPIO_DRIVE_1_2, .vregEn = 0UL, .ibufMode = 0UL, .vtripSel = 0UL, .vrefSel = 0UL, .vohSel = 0UL, }; #if defined (CY_USING_HAL) const cyhal_resource_inst_t CYBSP_A10_obj = { .type = CYHAL_RSC_GPIO, .block_num = CYBSP_A10_PORT_NUM, .channel_num = CYBSP_A10_PIN, }; #endif //defined (CY_USING_HAL) const cy_stc_gpio_pin_config_t CYBSP_A11_config = { .outVal = 1, .driveMode = CY_GPIO_DM_ANALOG, .hsiom = CYBSP_A11_HSIOM, .intEdge = CY_GPIO_INTR_DISABLE, .intMask = 0UL, .vtrip = CY_GPIO_VTRIP_CMOS, .slewRate = CY_GPIO_SLEW_FAST, .driveSel = CY_GPIO_DRIVE_1_2, .vregEn = 0UL, .ibufMode = 0UL, .vtripSel = 0UL, .vrefSel = 0UL, .vohSel = 0UL, }; #if defined (CY_USING_HAL) const cyhal_resource_inst_t CYBSP_A11_obj = { .type = CYHAL_RSC_GPIO, .block_num = CYBSP_A11_PORT_NUM, .channel_num = CYBSP_A11_PIN, }; #endif //defined (CY_USING_HAL) void init_cycfg_pins(void) { Cy_GPIO_Pin_Init(CYBSP_SWDIO_PORT, CYBSP_SWDIO_PIN, &CYBSP_SWDIO_config); Cy_GPIO_Pin_Init(CYBSP_SWDCK_PORT, CYBSP_SWDCK_PIN, &CYBSP_SWDCK_config); Cy_GPIO_Pin_Init(CYBSP_CINA_PORT, CYBSP_CINA_PIN, &CYBSP_CINA_config); Cy_GPIO_Pin_Init(CYBSP_CINB_PORT, CYBSP_CINB_PIN, &CYBSP_CINB_config); //Cy_GPIO_Pin_Init(CYBSP_CSD_BTN0_PORT, CYBSP_CSD_BTN0_PIN, &CYBSP_CSD_BTN0_config); } void reserve_cycfg_pins(void) { #if defined (CY_USING_HAL) cyhal_hwmgr_reserve(&CYBSP_SWDIO_obj); cyhal_hwmgr_reserve(&CYBSP_SWDCK_obj); cyhal_hwmgr_reserve(&CYBSP_CINA_obj); cyhal_hwmgr_reserve(&CYBSP_CINB_obj); cyhal_hwmgr_reserve(&CYBSP_LED_RGB_BLUE_obj); cyhal_hwmgr_reserve(&CYBSP_CMOD_obj); //cyhal_hwmgr_reserve(&CYBSP_CSD_BTN0_obj); cyhal_hwmgr_reserve(&CYBSP_A8_obj); cyhal_hwmgr_reserve(&CYBSP_A9_obj); cyhal_hwmgr_reserve(&CYBSP_A10_obj); cyhal_hwmgr_reserve(&CYBSP_A11_obj); #endif //defined (CY_USING_HAL) }