board.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*
  2. Copyright (C) 2015 Robert Lippert
  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 Teensy2++ board.
  17. */
  18. /*
  19. * Board identifier.
  20. */
  21. #define BOARD_TEENSY_2PLUSPLUS
  22. #define BOARD_NAME "PJRC Teensy 2++"
  23. /* All inputs with pull-ups */
  24. #define VAL_DDRA 0x00
  25. #define VAL_PORTA 0xFF
  26. /* All inputs with pull-ups */
  27. #define VAL_DDRB 0x00
  28. #define VAL_PORTB 0xFF
  29. /* All inputs with pull-ups */
  30. #define VAL_DDRC 0x00
  31. #define VAL_PORTC 0xFF
  32. /* All inputs with pull-ups, LED on D6, serial TX1 on D3 */
  33. #define VAL_DDRD 0x48
  34. #define VAL_PORTD 0xFF
  35. /* All inputs with pull-ups */
  36. #define VAL_DDRE 0x00
  37. #define VAL_PORTE 0xFF
  38. /* All inputs with pull-ups */
  39. #define VAL_DDRF 0x00
  40. #define VAL_PORTF 0xFF
  41. /* All inputs with pull-ups */
  42. #define VAL_DDRG 0x00
  43. #define VAL_PORTG 0xFF
  44. /* All inputs with pull-ups */
  45. #define VAL_DDRH 0x00
  46. #define VAL_PORTH 0xFF
  47. /* All inputs with pull-ups */
  48. #define VAL_DDRJ 0x00
  49. #define VAL_PORTJ 0xFF
  50. /* All inputs with pull-ups */
  51. #define VAL_DDRK 0x00
  52. #define VAL_PORTK 0xFF
  53. /* All inputs with pull-ups */
  54. #define VAL_DDRL 0x00
  55. #define VAL_PORTL 0xFF
  56. #define BOARD_LED1 6
  57. #if !defined(_FROM_ASM_)
  58. #ifdef __cplusplus
  59. extern "C" {
  60. #endif
  61. void boardInit(void);
  62. #ifdef __cplusplus
  63. }
  64. #endif
  65. #endif /* _FROM_ASM_ */
  66. #endif /* BOARD_H_ */