I'm trying to access the GPIO pins of a Raspberry Pi 3 model B directly from c++.
This code works fine with wiringPiSetup()
and wiringPiSetupGpio()
but I want to access the GPIO registers directly and wiringPySetupPhys()
doesn't work this way. I tried BCM and wiringPi pin numbering too.
What am I doing wrong? Are there any other way for fast GPIO access in c++?
#include <wiringPi.h>
int main(){
wiringPiSetupPhys();
pinMode(18,OUTPUT);
digitalWrite(18,HIGH);
}