3 Replies Latest reply on Sep 30, 2020 11:37 PM by AashitaR_11

    Confused about GPIO's



      What is the correct way to use GPIO's? We have a board where CYPD5225 has to control few devices by pulling several gpios low and high. Simple enough. However I can't seem to find clear example what is the right way (tm) of doing this.


      Only clue is FW_IND pin that is configured by default in the shipped example project.


      This autogenerates some pin functions but those are not used.


      Instead example code uses some low level api and hardcoded defines.


          gpio_set_value (FW_LED_GPIO_PORT_PIN, !(gpio_read_value (FW_LED_GPIO_PORT_PIN)));





         /* Configure the LED control GPIO as an output. */

         gpio_hsiom_set_config (FW_LED_GPIO_PORT_PIN, HSIOM_MODE_GPIO, GPIO_DM_STRONG, true);


      Is there a simple example how GPIO's should be used?