Advertisement
AtomSoft

Fubarino Header

Apr 15th, 2014
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 3.46 KB | None | 0 0
  1. /*
  2.  * File:   fubmini.h
  3.  * Author: Jason
  4.  *
  5.  * Created on February 28, 2014, 8:51 AM
  6.  */
  7.  
  8. #ifndef FUBMINI_H
  9. #define FUBMINI_H
  10.  
  11. #define FUB_PAD0  (1<<13)
  12. #define FUB_PAD1  (1<<10)
  13. #define FUB_PAD2  (1<<7)
  14. #define FUB_PAD3  (1<<14)
  15. #define FUB_PAD4  (1<<15)
  16. #define FUB_PAD5  (1<<0)
  17. #define FUB_PAD6  (1<<1)
  18. #define FUB_PAD7  (1<<0)
  19. #define FUB_PAD8  (1<<1)
  20. #define FUB_PAD9  (1<<2)
  21. #define FUB_PAD10 (1<<3)
  22. #define FUB_PAD11 (1<<0)
  23. #define FUB_PAD12 (1<<1)
  24. #define FUB_PAD13 (1<<2)
  25. #define FUB_PAD14 (1<<2)
  26. #define FUB_PAD15 (1<<3)
  27. #define FUB_PAD16 (1<<8)
  28. #define FUB_PAD17 (1<<4)
  29. #define FUB_PAD18 (1<<4)
  30. #define FUB_PAD19 (1<<9)
  31. #define FUB_PAD20 (1<<3)
  32. #define FUB_PAD21 (1<<4)
  33. #define FUB_PAD22 (1<<5)
  34. #define FUB_PAD23 (1<<5)
  35. #define FUB_PAD24 (1<<7)
  36. #define FUB_PAD25 (1<<8)
  37. #define FUB_PAD26 (1<<9)
  38. #define FUB_PAD27 (1<<6)
  39. #define FUB_PAD28 (1<<7)
  40. #define FUB_PAD29 (1<<8)
  41. #define FUB_PAD30 (1<<9)
  42. #define FUB_PAD31 (1<<10)
  43. #define FUB_PAD32 (1<<11)
  44.  
  45. #define PORT_FUB_P0  LATB
  46. #define PORT_FUB_P1  LATA
  47. #define PORT_FUB_P2  LATA
  48. #define PORT_FUB_P3  LATB
  49. #define PORT_FUB_P4  LATB
  50. #define PORT_FUB_P5  LATA
  51. #define PORT_FUB_P6  LATA
  52. #define PORT_FUB_P7  LATB
  53. #define PORT_FUB_P8  LATB
  54. #define PORT_FUB_P9  LATB
  55. #define PORT_FUB_P10 LATB
  56. #define PORT_FUB_P11 LATC
  57. #define PORT_FUB_P12 LATC
  58. #define PORT_FUB_P13 LATC
  59. #define PORT_FUB_P14 LATA
  60. #define PORT_FUB_P15 LATA
  61. #define PORT_FUB_P16 LATA
  62. #define PORT_FUB_P17 LATB
  63. #define PORT_FUB_P18 LATA
  64. #define PORT_FUB_P19 LATA
  65. #define PORT_FUB_P20 LATC
  66. #define PORT_FUB_P21 LATC
  67. #define PORT_FUB_P22 LATC
  68. #define PORT_FUB_P23 LATB
  69. #define PORT_FUB_P24 LATB
  70. #define PORT_FUB_P25 LATB
  71. #define PORT_FUB_P26 LATB
  72. #define PORT_FUB_P27 LATC
  73. #define PORT_FUB_P28 LATC
  74. #define PORT_FUB_P29 LATC
  75. #define PORT_FUB_P30 LATC
  76. #define PORT_FUB_P31 LATB
  77. #define PORT_FUB_P32 LATB
  78.  
  79. #define FUB_P0  IOPORT_B,FUB_PAD0
  80. #define FUB_P1  IOPORT_A,FUB_PAD1
  81. #define FUB_P2  IOPORT_A,FUB_PAD2
  82. #define FUB_P3  IOPORT_B,FUB_PAD3
  83. #define FUB_P4  IOPORT_B,FUB_PAD4
  84. #define FUB_P5  IOPORT_A,FUB_PAD5
  85. #define FUB_P6  IOPORT_A,FUB_PAD6
  86. #define FUB_P7  IOPORT_B,FUB_PAD7
  87. #define FUB_P8  IOPORT_B,FUB_PAD8
  88. #define FUB_P9  IOPORT_B,FUB_PAD9
  89. #define FUB_P10 IOPORT_B,FUB_PAD10
  90. #define FUB_P11 IOPORT_C,FUB_PAD11
  91. #define FUB_P12 IOPORT_C,FUB_PAD12
  92. #define FUB_P13 IOPORT_C,FUB_PAD13
  93. #define FUB_P14 IOPORT_A,FUB_PAD14
  94. #define FUB_P15 IOPORT_A,FUB_PAD15
  95. #define FUB_P16 IOPORT_A,FUB_PAD16
  96. #define FUB_P17 IOPORT_B,FUB_PAD17
  97. #define FUB_P18 IOPORT_A,FUB_PAD18
  98. #define FUB_P19 IOPORT_A,FUB_PAD19
  99. #define FUB_P20 IOPORT_C,FUB_PAD20
  100. #define FUB_P21 IOPORT_C,FUB_PAD21
  101. #define FUB_P22 IOPORT_C,FUB_PAD22
  102. #define FUB_P23 IOPORT_B,FUB_PAD23
  103. #define FUB_P24 IOPORT_B,FUB_PAD24
  104. #define FUB_P25 IOPORT_B,FUB_PAD25
  105. #define FUB_P26 IOPORT_B,FUB_PAD26
  106. #define FUB_P27 IOPORT_C,FUB_PAD27
  107. #define FUB_P28 IOPORT_C,FUB_PAD28
  108. #define FUB_P29 IOPORT_C,FUB_PAD29
  109. #define FUB_P30 IOPORT_C,FUB_PAD30
  110. #define FUB_P31 IOPORT_B,FUB_PAD31
  111. #define FUB_P32 IOPORT_B,FUB_PAD32
  112.  
  113. #define USR_LED  IOPORT_A,FUB_PAD1
  114.  
  115. #define FUBARINO_IOA_MAP (FUB_PAD1|FUB_PAD2|FUB_PAD5|FUB_PAD6|FUB_PAD14|FUB_PAD15|FUB_PAD16|FUB_PAD18|FUB_PAD19)
  116. #define FUBARINO_IOB_MAP (FUB_PAD0|FUB_PAD3|FUB_PAD4|FUB_PAD7|FUB_PAD8|FUB_PAD9|FUB_PAD10|FUB_PAD17|FUB_PAD23|FUB_PAD24|FUB_PAD25|FUB_PAD26|FUB_PAD31|FUB_PAD32)
  117. #define FUBARINO_IOC_MAP (FUB_PAD20|FUB_PAD21|FUB_PAD22|FUB_PAD11|FUB_PAD12|FUB_PAD13|FUB_PAD27|FUB_PAD28|FUB_PAD29|FUB_PAD30)
  118.  
  119. #endif  /* FUBMINI_H */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement