您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

khadas_vim1.h 2.5 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*************************************************************************************/
  2. /* */
  3. /* WiringPi KHADAS_VIM1 Board Header file */
  4. /* */
  5. /*************************************************************************************/
  6. /*-----------------------------------------------------------------------------------*/
  7. #ifndef __KHADAS_VIM1_H__
  8. #define __KHADAS_VIM1_H__
  9. /*----------------------------------------------------------------------------------*/
  10. #define VIM1_GPIO_MASK (0xFFFFFF00)
  11. #define VIM1_GPIO_BASE 0xc8834000
  12. #define VIM1_GPIOAO_BASE 0xc8100000
  13. #define VIM1_GPIO_PIN_BASE 400
  14. #define VIM1_GPIODV_PIN_START (VIM1_GPIO_PIN_BASE + 49) //400+49=449
  15. #define VIM1_GPIODV_PIN_END (VIM1_GPIO_PIN_BASE + 78)
  16. #define VIM1_GPIOH_PIN_START (VIM1_GPIO_PIN_BASE + 16) //400+16=416
  17. #define VIM1_GPIOH_PIN_END (VIM1_GPIO_PIN_BASE + 25)
  18. #define VIM1_GPIOAO_PIN_START (VIM1_GPIO_PIN_BASE + 30) //400+30=430
  19. #define VIM1_GPIOAO_PIN_END (VIM1_GPIO_PIN_BASE + 39)
  20. #define VIM1_GPIODV_FSEL_REG_OFFSET 0x10C //[29:0]
  21. #define VIM1_GPIODV_OUTP_REG_OFFSET 0x10D //[29:0]
  22. #define VIM1_GPIODV_INP_REG_OFFSET 0x10E //[29:0]
  23. #define VIM1_GPIODV_PUPD_REG_OFFSET 0x13a //[29:0]
  24. #define VIM1_GPIODV_PUEN_REG_OFFSET 0x148 //[29:0]
  25. #define VIM1_GPIOH_FSEL_REG_OFFSET 0x10F //[29:20]
  26. #define VIM1_GPIOH_OUTP_REG_OFFSET 0x110 //[29:20]
  27. #define VIM1_GPIOH_INP_REG_OFFSET 0x111 //[29:20]
  28. #define VIM1_GPIOH_PUPD_REG_OFFSET 0x13b //[29:20]
  29. #define VIM1_GPIOH_PUEN_REG_OFFSET 0x149 //[29:20]
  30. #define VIM1_GPIOAO_FSEL_REG_OFFSET 0x009 //[9:0]
  31. #define VIM1_GPIOAO_OUTP_REG_OFFSET 0x009 //[25:16]
  32. #define VIM1_GPIOAO_INP_REG_OFFSET 0x00a //[9:0]
  33. #define VIM1_GPIOAO_PUPD_REG_OFFSET
  34. #define VIM1_GPIOAO_PUEN_REG_OFFSET
  35. #define VIM1_MUX_0_REG_OFFSET 0x12C
  36. #define VIM1_MUX_1_REG_OFFSET 0x12D
  37. #define VIM1_MUX_2_REG_OFFSET 0x12E
  38. #define VIM1_MUX_3_REG_OFFSET 0x12F
  39. #define VIM1_MUX_4_REG_OFFSET 0x130
  40. #define VIM1_MUX_5_REG_OFFSET 0x131
  41. #define VIM1_MUX_6_REG_OFFSET 0x132
  42. #define VIM1_MUX_7_REG_OFFSET 0x133
  43. #define VIM1_MUX_8_REG_OFFSET 0x134
  44. #define VIM1_MUX_9_REG_OFFSET 0x135
  45. #define VIM1_AO_MUX_1_REG_OFFSET 0x005
  46. #define VIM1_AO_MUX_2_REG_OFFSET 0x006
  47. #ifdef __cplusplus
  48. extern "C" {
  49. #endif
  50. extern void init_khadas_vim1(struct libkhadas *libwiring);
  51. #ifdef __cpluscplus
  52. }
  53. #endif
  54. #endif /* __KHADAS_VIM1_H__ */