EC200UCN GPIO setting

Hello everyone, I’m trying to control the GPIO via Quecopen api. Unfortunately it does not work.

ql_gpio_init(GPIO_14, GPIO_OUTPUT, 0xff, LVL_HIGH);
ql_gpio_set_direction(GPIO_14, GPIO_OUTPUT);
ql_gpio_set_level(GPIO_14, LVL_HIGH);


ql_gpio_init(141, GPIO_OUTPUT, 0xff, LVL_HIGH);
ql_gpio_set_direction(141, GPIO_OUTPUT);
ql_gpio_set_level(141, LVL_HIGH);

Hi @J_S_Sahoo ,
You can refer to the GPIO demo (“components\ql-application\peripheral\gpio_demo.c”). The correct procedure should be:

  1. pin set function
  2. deinit
  3. init
  4. set direction if you want to change it
  5. set level

Please note that in ql_pin_set_func(), you should pass the actual pin number as the first parameter, while in other GPIO functions you use the ql_GpioNum enum.

Thank you. It worked