AnsweredAssumed Answered

lwgpio pin grouping

Question asked by Lee Penn on Oct 7, 2013
Latest reply on Oct 8, 2013 by Martin Kojtal


I found an old example using full gpio for pin grouping and wondering if there exists similar one for lwgpio and MQX 4.0?

 

 

 

   GPIO_PIN_STRUCT pins[] = {

      BSP_LED1,

      BSP_LED2,

      BSP_LED3,

      GPIO_LIST_END

   };

followed by:


pins[0] |= GPIO_PIN_STATUS_1;   //LED1 on
pins[1] &= ~GPIO_PIN_STATUS_0;  //LED2 off
pins[2] |= GPIO_PIN_STATUS_1;   //LED3 on

ioctl(output_port, GPIO_IOCTL_WRITE, &pins);

Outcomes