Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Virtual GPIO emulation

Does exist a virtual GPIO driver to be used for a programming needs?

I have to develop a software on my Linux PC, and then try it on some embedded systems with physical GPIOs (C.H.I.P., OpenWRT, and so on...)?

Thank you!

like image 383
Antonio Petricca Avatar asked Dec 30 '16 13:12

Antonio Petricca


1 Answers

The solution exists and is available since kernel 4.10 as GPIO mockup driver.

Some references for you:

  • https://github.com/torvalds/linux/blob/v4.10/tools/testing/selftests/gpio/gpio-mockup.sh
  • https://github.com/torvalds/linux/blob/master/drivers/gpio/gpio-mockup.c
like image 111
Antonio Petricca Avatar answered Nov 03 '22 03:11

Antonio Petricca