lwgpio pin grouping

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,178件の閲覧回数
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 件の賞賛
返信
1 解決策
766件の閲覧回数
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 件の賞賛
返信
2 返答(返信)
766件の閲覧回数
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 件の賞賛
返信
767件の閲覧回数
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 件の賞賛
返信