gpio.pp 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. {
  2. Copyright (c) 1998-2022 by the Free Pascal development team
  3. Raspberry Pi 3 GPIO hardware defines for aarch64-embedded targets
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. ****************************************************************************
  16. }
  17. {$IFNDEF FPC_DOTTEDUNITS}
  18. unit gpio;
  19. {$ENDIF FPC_DOTTEDUNITS}
  20. interface
  21. const
  22. PeripheralBase = $3F000000;
  23. GPFSEL0 = PeripheralBase + $00200000;
  24. GPFSEL1 = PeripheralBase + $00200004;
  25. GPFSEL2 = PeripheralBase + $00200008;
  26. GPFSEL3 = PeripheralBase + $0020000C;
  27. GPFSEL4 = PeripheralBase + $00200010;
  28. GPFSEL5 = PeripheralBase + $00200014;
  29. GPSET0 = PeripheralBase + $0020001C;
  30. GPSET1 = PeripheralBase + $00200020;
  31. GPCLR0 = PeripheralBase + $00200028;
  32. GPLEV0 = PeripheralBase + $00200034;
  33. GPLEV1 = PeripheralBase + $00200038;
  34. GPEDS0 = PeripheralBase + $00200040;
  35. GPEDS1 = PeripheralBase + $00200044;
  36. GPHEN0 = PeripheralBase + $00200064;
  37. GPHEN1 = PeripheralBase + $00200068;
  38. GPPUD = PeripheralBase + $00200094;
  39. GPPUDCLK0 = PeripheralBase + $00200098;
  40. GPPUDCLK1 = PeripheralBase + $0020009C;
  41. implementation
  42. end.