Read GPIO Through /dev/mem on BeagleBoneBlack?

I’m trying to speed up some PWM IO code by reading/writing straight through /dev/mem

I found an example that toggles a led, but non that read GPIO as input.

Can anyone point me to an example or some documentation of the GPIO’s physical memory addresses?


You want the AM335x Technical Reference Manual from TI.

Though you cannot avoid searching TRM, Technical Reference Manual, you can get some help on this site.