gpio.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef __AG101_GPIOC_INC__
  2. #define __AG101_GPIOC_INC__
  3. //#include "hal.h"
  4. // GPIO port name definition
  5. typedef enum GPIOD_PORTS
  6. {
  7. GPIO0 = 0x00000001,
  8. GPIO1 = 0x00000002,
  9. GPIO2 = 0x00000004,
  10. GPIO3 = 0x00000008,
  11. GPIO4 = 0x00000010,
  12. GPIO5 = 0x00000020,
  13. GPIO6 = 0x00000040,
  14. GPIO7 = 0x00000080,
  15. GPIO8 = 0x00000100,
  16. GPIO9 = 0x00000200,
  17. GPIO10 = 0x00000400,
  18. GPIO11 = 0x00000800,
  19. GPIO12 = 0x00001000,
  20. GPIO13 = 0x00002000,
  21. GPIO14 = 0x00004000,
  22. GPIO15 = 0x00008000,
  23. GPIO16 = 0x00010000,
  24. GPIO17 = 0x00020000,
  25. GPIO18 = 0x00040000,
  26. GPIO19 = 0x00080000,
  27. GPIO20 = 0x00100000,
  28. GPIO21 = 0x00200000,
  29. GPIO22 = 0x00400000,
  30. GPIO23 = 0x00800000,
  31. GPIO24 = 0x01000000,
  32. GPIO25 = 0x02000000,
  33. GPIO26 = 0x04000000,
  34. GPIO27 = 0x08000000,
  35. GPIO28 = 0x10000000,
  36. GPIO29 = 0x20000000,
  37. GPIO30 = 0x40000000,
  38. GPIO31 = 0x80000000,
  39. } GPIOD_PORTS;
  40. struct gpio_dev_t
  41. {
  42. // hal_bh_t hisr;
  43. unsigned int int_data;
  44. };
  45. #endif // __AG101_GPIOC_INC__