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);
已解决! 转到解答。
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
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