lwgpio pin grouping

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

lwgpio pin grouping

Jump to solution
936 Views
leepenn
Contributor III


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);
0 Kudos
1 Solution
524 Views
DavidS
NXP Employee
NXP Employee

Hi Lee,

The older GPIO driver has been deprecated as it was very convolved/convoluted.obtuse/abstracted/big/confusing/etc...and was replaced with the lwgpio driver.

Not sure why in MQX4.0.x we have moved the lwgpio driver example from ~/examples/lwgpio to ~/examples/gpio but that is what has happened.

Please look at the gpio folder example for the lwgpio pin implementation.

(C:\Freescale\Freescale_MQX_4_0\mqx\examples\gpio).

The ~/docs/mqx/MQXIOUG.pdf has a lwgpio chapter than explains that we no longer support pin grouping but only control of gpio on a "per-pin" basis.

Any grouping operation is one you would have to implement.

Regards,

David


View solution in original post

0 Kudos
2 Replies
524 Views
c0170
Senior Contributor III

Hello Lee Penn,

an addition to David's reply: There's HMI layer (an example also), which groups buttons, LEDs, touch controls. Might be what you need.

Regards,

0xc0170

0 Kudos
525 Views
DavidS
NXP Employee
NXP Employee

Hi Lee,

The older GPIO driver has been deprecated as it was very convolved/convoluted.obtuse/abstracted/big/confusing/etc...and was replaced with the lwgpio driver.

Not sure why in MQX4.0.x we have moved the lwgpio driver example from ~/examples/lwgpio to ~/examples/gpio but that is what has happened.

Please look at the gpio folder example for the lwgpio pin implementation.

(C:\Freescale\Freescale_MQX_4_0\mqx\examples\gpio).

The ~/docs/mqx/MQXIOUG.pdf has a lwgpio chapter than explains that we no longer support pin grouping but only control of gpio on a "per-pin" basis.

Any grouping operation is one you would have to implement.

Regards,

David


0 Kudos