Power & Source of Big Ideas

Using IR and SPDIF ports as GPIO

Moderators: chensy, FATechsupport

Is it possible to use IR and SPDIF ports as "ordinary" GPIO input/output ports in nanoPi NEO? Ports are optionally labelled as PL11 and PA17. If so, what are the numbers for BCM and wPi, because this ports are not listed by "gpio readall" command.
I'm not sure if they can be used as GPIO's, as I don't have a NanoPi NEO, but you don't need to the know the WiringPi numbers. You can use wiringPiSetupGpio(void)

from [url]http://wiki.friendlyarm.com/wiki/index.php?title=WiringNP:_NanoPi_NEO/NEO2/Air_GPIO_Programming_with_C&redirect=no#Popular_WiringNP_APIs
[/url]:

int wiringPiSetup (void)
This initializes wiringPi and assumes that the calling program is going to use the wiringPi pin numbering scheme. The numbering scheme can be checked by running "gpio readall".
You must be root to call this function.

int wiringPiSetupGpio(void)
This function is the same as the above one, however it allows the calling program to use the SoC's GPIO pin numbers directly without re-mapping.
You must be root to call this function.

int wiringPiSetupPhys (void)
This function is the same as "wiringPiSetup", however it allows the calling program to use the physical pin numbers on the P1 connector only.
You must be root to call this function.


I have found that wiringNP is also dependent on the OS that you are running. I found yesterday that it won't recognise my NanoPi Neo AIR running Armbian.

Hope this helps

Who is online

In total there are 36 users online :: 0 registered, 0 hidden and 36 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 36 guests