General Purpose Input/Output (GPIO) — The Linux Kernel ...
www.kernel.org › doc › htmlThe gpiochip will need to be initialized and registered before calling this function. This function will handle two cell:ed simple IRQs and assumes all the pins on the gpiochip can generate a unique IRQ. Everything else need to be open coded. int gpiochip_generic_request (struct gpio_chip * chip, unsigned offset) ¶ request the gpio function ...
RPi GPIO Code Samples - eLinux.org
https://elinux.org/RPi_GPIO_Code_Samples15.12.2020 · Direct register access. Gert van Loo & Dom, have provided some tested code which accesses the GPIO pins through direct GPIO register manipulation in C-code. (Thanks to Dom for doing the difficult work of finding and testing the mapping.) Note: For Raspberry Pi 2 and Pi 3, change BCM2708_PERI_BASE to 0x3F000000 for the code to work.