logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

board.h (8245B)


  1. /*
  2. ChibiOS - Copyright (C) 2015 RedoX https://github.com/RedoXyde
  3. Licensed under the Apache License, Version 2.0 (the "License");
  4. you may not use this file except in compliance with the License.
  5. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. #ifndef _BOARD_H_
  14. #define _BOARD_H_
  15. /*
  16. * Setup for the PJRC Teensy 3.1 board.
  17. */
  18. /*
  19. * Board identifier.
  20. */
  21. #define BOARD_PJRC_TEENSY_3_1
  22. #define BOARD_NAME "PJRC Teensy 3.1"
  23. /* External 16 MHz crystal */
  24. #define KINETIS_XTAL_FREQUENCY 16000000UL
  25. /* Use internal capacitors for the crystal */
  26. #define KINETIS_BOARD_OSCILLATOR_SETTING OSC_CR_SC8P | OSC_CR_SC2P
  27. /*
  28. * MCU type
  29. */
  30. #define K20x7
  31. /*
  32. * IO pins assignments.
  33. */
  34. #define PORTA_PIN0 0
  35. #define PORTA_PIN1 1
  36. #define PORTA_PIN2 2
  37. #define PORTA_PIN3 3
  38. #define TEENSY_PIN33 4
  39. #define TEENSY_PIN24 5
  40. #define PORTA_PIN6 6
  41. #define PORTA_PIN7 7
  42. #define PORTA_PIN8 8
  43. #define PORTA_PIN9 9
  44. #define PORTA_PIN10 10
  45. #define PORTA_PIN11 11
  46. #define TEENSY_PIN3 12
  47. #define TEENSY_PIN4 13
  48. #define PORTA_PIN14 14
  49. #define PORTA_PIN15 15
  50. #define PORTA_PIN16 16
  51. #define PORTA_PIN17 17
  52. #define PORTA_PIN18 18
  53. #define PORTA_PIN19 19
  54. #define PORTA_PIN20 20
  55. #define PORTA_PIN21 21
  56. #define PORTA_PIN22 22
  57. #define PORTA_PIN23 23
  58. #define PORTA_PIN24 24
  59. #define PORTA_PIN25 25
  60. #define PORTA_PIN26 26
  61. #define PORTA_PIN27 27
  62. #define PORTA_PIN28 28
  63. #define PORTA_PIN29 29
  64. #define PORTA_PIN30 30
  65. #define PORTA_PIN31 31
  66. #define TEENSY_PIN3_IOPORT IOPORT1
  67. #define TEENSY_PIN4_IOPORT IOPORT1
  68. #define TEENSY_PIN24_IOPORT IOPORT1
  69. #define TEENSY_PIN33_IOPORT IOPORT1
  70. #define TEENSY_PIN16 0
  71. #define TEENSY_PIN17 1
  72. #define TEENSY_PIN19 2
  73. #define TEENSY_PIN18 3
  74. #define PORTB_PIN4 4
  75. #define PORTB_PIN5 5
  76. #define PORTB_PIN6 6
  77. #define PORTB_PIN7 7
  78. #define PORTB_PIN8 8
  79. #define PORTB_PIN9 9
  80. #define PORTB_PIN10 10
  81. #define PORTB_PIN11 11
  82. #define PORTB_PIN12 12
  83. #define PORTB_PIN13 13
  84. #define PORTB_PIN14 14
  85. #define PORTB_PIN15 15
  86. #define TEENSY_PIN0 16
  87. #define TEENSY_PIN1 17
  88. #define TEENSY_PIN32 18
  89. #define TEENSY_PIN25 19
  90. #define PORTB_PIN20 20
  91. #define PORTB_PIN21 21
  92. #define PORTB_PIN22 22
  93. #define PORTB_PIN23 23
  94. #define PORTB_PIN24 24
  95. #define PORTB_PIN25 25
  96. #define PORTB_PIN26 26
  97. #define PORTB_PIN27 27
  98. #define PORTB_PIN28 28
  99. #define PORTB_PIN29 29
  100. #define PORTB_PIN30 30
  101. #define PORTB_PIN31 31
  102. #define TEENSY_PIN0_IOPORT IOPORT2
  103. #define TEENSY_PIN1_IOPORT IOPORT2
  104. #define TEENSY_PIN16_IOPORT IOPORT2
  105. #define TEENSY_PIN17_IOPORT IOPORT2
  106. #define TEENSY_PIN18_IOPORT IOPORT2
  107. #define TEENSY_PIN19_IOPORT IOPORT2
  108. #define TEENSY_PIN25_IOPORT IOPORT2
  109. #define TEENSY_PIN32_IOPORT IOPORT2
  110. #define TEENSY_PIN15 0
  111. #define TEENSY_PIN22 1
  112. #define TEENSY_PIN23 2
  113. #define TEENSY_PIN9 3
  114. #define TEENSY_PIN10 4
  115. #define TEENSY_PIN13 5
  116. #define TEENSY_PIN11 6
  117. #define TEENSY_PIN12 7
  118. #define TEENSY_PIN28 8
  119. #define TEENSY_PIN27 9
  120. #define TEENSY_PIN29 10
  121. #define TEENSY_PIN30 11
  122. #define PORTC_PIN12 12
  123. #define PORTC_PIN13 13
  124. #define PORTC_PIN14 14
  125. #define PORTC_PIN15 15
  126. #define PORTC_PIN16 16
  127. #define PORTC_PIN17 17
  128. #define PORTC_PIN18 18
  129. #define PORTC_PIN19 19
  130. #define PORTC_PIN20 20
  131. #define PORTC_PIN21 21
  132. #define PORTC_PIN22 22
  133. #define PORTC_PIN23 23
  134. #define PORTC_PIN24 24
  135. #define PORTC_PIN25 25
  136. #define PORTC_PIN26 26
  137. #define PORTC_PIN27 27
  138. #define PORTC_PIN28 28
  139. #define PORTC_PIN29 29
  140. #define PORTC_PIN30 30
  141. #define PORTC_PIN31 31
  142. #define TEENSY_PIN9_IOPORT IOPORT3
  143. #define TEENSY_PIN10_IOPORT IOPORT3
  144. #define TEENSY_PIN11_IOPORT IOPORT3
  145. #define TEENSY_PIN12_IOPORT IOPORT3
  146. #define TEENSY_PIN13_IOPORT IOPORT3
  147. #define TEENSY_PIN15_IOPORT IOPORT3
  148. #define TEENSY_PIN22_IOPORT IOPORT3
  149. #define TEENSY_PIN23_IOPORT IOPORT3
  150. #define TEENSY_PIN27_IOPORT IOPORT3
  151. #define TEENSY_PIN28_IOPORT IOPORT3
  152. #define TEENSY_PIN29_IOPORT IOPORT3
  153. #define TEENSY_PIN30_IOPORT IOPORT3
  154. #define TEENSY_PIN2 0
  155. #define TEENSY_PIN14 1
  156. #define TEENSY_PIN7 2
  157. #define TEENSY_PIN8 3
  158. #define TEENSY_PIN6 4
  159. #define TEENSY_PIN20 5
  160. #define TEENSY_PIN21 6
  161. #define TEENSY_PIN5 7
  162. #define PORTD_PIN8 8
  163. #define PORTD_PIN9 9
  164. #define PORTD_PIN10 10
  165. #define PORTD_PIN11 11
  166. #define PORTD_PIN12 12
  167. #define PORTD_PIN13 13
  168. #define PORTD_PIN14 14
  169. #define PORTD_PIN15 15
  170. #define PORTD_PIN16 16
  171. #define PORTD_PIN17 17
  172. #define PORTD_PIN18 18
  173. #define PORTD_PIN19 19
  174. #define PORTD_PIN20 20
  175. #define PORTD_PIN21 21
  176. #define PORTD_PIN22 22
  177. #define PORTD_PIN23 23
  178. #define PORTD_PIN24 24
  179. #define PORTD_PIN25 25
  180. #define PORTD_PIN26 26
  181. #define PORTD_PIN27 27
  182. #define PORTD_PIN28 28
  183. #define PORTD_PIN29 29
  184. #define PORTD_PIN30 30
  185. #define PORTD_PIN31 31
  186. #define TEENSY_PIN2_IOPORT IOPORT4
  187. #define TEENSY_PIN5_IOPORT IOPORT4
  188. #define TEENSY_PIN6_IOPORT IOPORT4
  189. #define TEENSY_PIN7_IOPORT IOPORT4
  190. #define TEENSY_PIN8_IOPORT IOPORT4
  191. #define TEENSY_PIN14_IOPORT IOPORT4
  192. #define TEENSY_PIN20_IOPORT IOPORT4
  193. #define TEENSY_PIN21_IOPORT IOPORT4
  194. #define TEENSY_PIN31 0
  195. #define TEENSY_PIN26 1
  196. #define PORTE_PIN2 2
  197. #define PORTE_PIN3 3
  198. #define PORTE_PIN4 4
  199. #define PORTE_PIN5 5
  200. #define PORTE_PIN6 6
  201. #define PORTE_PIN7 7
  202. #define PORTE_PIN8 8
  203. #define PORTE_PIN9 9
  204. #define PORTE_PIN10 10
  205. #define PORTE_PIN11 11
  206. #define PORTE_PIN12 12
  207. #define PORTE_PIN13 13
  208. #define PORTE_PIN14 14
  209. #define PORTE_PIN15 15
  210. #define PORTE_PIN16 16
  211. #define PORTE_PIN17 17
  212. #define PORTE_PIN18 18
  213. #define PORTE_PIN19 19
  214. #define PORTE_PIN20 20
  215. #define PORTE_PIN21 21
  216. #define PORTE_PIN22 22
  217. #define PORTE_PIN23 23
  218. #define PORTE_PIN24 24
  219. #define PORTE_PIN25 25
  220. #define PORTE_PIN26 26
  221. #define PORTE_PIN27 27
  222. #define PORTE_PIN28 28
  223. #define PORTE_PIN29 29
  224. #define PORTE_PIN30 30
  225. #define PORTE_PIN31 31
  226. #define TEENSY_PIN26_IOPORT IOPORT5
  227. #define TEENSY_PIN31_IOPORT IOPORT5
  228. #define LINE_PIN1 PAL_LINE(TEENSY_PIN1_IOPORT, TEENSY_PIN1)
  229. #define LINE_PIN2 PAL_LINE(TEENSY_PIN2_IOPORT, TEENSY_PIN2)
  230. #define LINE_PIN3 PAL_LINE(TEENSY_PIN3_IOPORT, TEENSY_PIN3)
  231. #define LINE_PIN4 PAL_LINE(TEENSY_PIN4_IOPORT, TEENSY_PIN4)
  232. #define LINE_PIN5 PAL_LINE(TEENSY_PIN5_IOPORT, TEENSY_PIN5)
  233. #define LINE_PIN6 PAL_LINE(TEENSY_PIN6_IOPORT, TEENSY_PIN6)
  234. #define LINE_PIN7 PAL_LINE(TEENSY_PIN7_IOPORT, TEENSY_PIN7)
  235. #define LINE_PIN8 PAL_LINE(TEENSY_PIN8_IOPORT, TEENSY_PIN8)
  236. #define LINE_PIN9 PAL_LINE(TEENSY_PIN9_IOPORT, TEENSY_PIN9)
  237. #define LINE_PIN10 PAL_LINE(TEENSY_PIN10_IOPORT, TEENSY_PIN10)
  238. #define LINE_PIN11 PAL_LINE(TEENSY_PIN11_IOPORT, TEENSY_PIN11)
  239. #define LINE_PIN12 PAL_LINE(TEENSY_PIN12_IOPORT, TEENSY_PIN12)
  240. #define LINE_PIN13 PAL_LINE(TEENSY_PIN13_IOPORT, TEENSY_PIN13)
  241. #define LINE_PIN14 PAL_LINE(TEENSY_PIN14_IOPORT, TEENSY_PIN14)
  242. #define LINE_PIN15 PAL_LINE(TEENSY_PIN15_IOPORT, TEENSY_PIN15)
  243. #define LINE_PIN16 PAL_LINE(TEENSY_PIN16_IOPORT, TEENSY_PIN16)
  244. #define LINE_PIN17 PAL_LINE(TEENSY_PIN17_IOPORT, TEENSY_PIN17)
  245. #define LINE_PIN18 PAL_LINE(TEENSY_PIN18_IOPORT, TEENSY_PIN18)
  246. #define LINE_PIN19 PAL_LINE(TEENSY_PIN19_IOPORT, TEENSY_PIN19)
  247. #define LINE_PIN20 PAL_LINE(TEENSY_PIN20_IOPORT, TEENSY_PIN20)
  248. #define LINE_PIN21 PAL_LINE(TEENSY_PIN21_IOPORT, TEENSY_PIN21)
  249. #define LINE_PIN22 PAL_LINE(TEENSY_PIN22_IOPORT, TEENSY_PIN22)
  250. #define LINE_PIN23 PAL_LINE(TEENSY_PIN23_IOPORT, TEENSY_PIN23)
  251. #define LINE_PIN24 PAL_LINE(TEENSY_PIN24_IOPORT, TEENSY_PIN24)
  252. #define LINE_PIN25 PAL_LINE(TEENSY_PIN25_IOPORT, TEENSY_PIN25)
  253. #define LINE_PIN25 PAL_LINE(TEENSY_PIN25_IOPORT, TEENSY_PIN25)
  254. #define LINE_PIN26 PAL_LINE(TEENSY_PIN26_IOPORT, TEENSY_PIN26)
  255. #define LINE_PIN27 PAL_LINE(TEENSY_PIN27_IOPORT, TEENSY_PIN27)
  256. #define LINE_PIN28 PAL_LINE(TEENSY_PIN28_IOPORT, TEENSY_PIN28)
  257. #define LINE_PIN29 PAL_LINE(TEENSY_PIN29_IOPORT, TEENSY_PIN29)
  258. #define LINE_PIN30 PAL_LINE(TEENSY_PIN30_IOPORT, TEENSY_PIN30)
  259. #define LINE_PIN31 PAL_LINE(TEENSY_PIN31_IOPORT, TEENSY_PIN31)
  260. #define LINE_PIN32 PAL_LINE(TEENSY_PIN32_IOPORT, TEENSY_PIN32)
  261. #define LINE_PIN33 PAL_LINE(TEENSY_PIN33_IOPORT, TEENSY_PIN33)
  262. #define LINE_LED LINE_PIN13
  263. #if !defined(_FROM_ASM_)
  264. # ifdef __cplusplus
  265. extern "C" {
  266. # endif
  267. void boardInit(void);
  268. # ifdef __cplusplus
  269. }
  270. # endif
  271. #endif /* _FROM_ASM_ */
  272. #endif /* _BOARD_H_ */