board.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
  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 Arduino Uno or board.
  17. */
  18. /*
  19. * Board identifier.
  20. */
  21. #define BOARD_ARDUINO_NANO
  22. #define BOARD_NAME "Arduino Nano"
  23. /*
  24. * IO pins assignments.
  25. */
  26. #define PORTB_LED1 5
  27. /*
  28. * IO lines assignments.
  29. */
  30. #define LINE_LED1 PAL_LINE(IOPORT2, 5U)
  31. /*
  32. * Port B setup.
  33. * All inputs except PB5 which has a LED connected.
  34. */
  35. #define VAL_DDRB 0x20
  36. #define VAL_PORTB 0xFF
  37. /*
  38. * Port C setup.
  39. * All inputs with pull-ups.
  40. */
  41. #define VAL_DDRC 0x00
  42. #define VAL_PORTC 0xFF
  43. /*
  44. * Port D setup.
  45. * All inputs except PD1 (Serial TX0).
  46. */
  47. #define VAL_DDRD 0x02
  48. #define VAL_PORTD 0xFF
  49. #if !defined(_FROM_ASM_)
  50. #ifdef __cplusplus
  51. extern "C" {
  52. #endif
  53. void boardInit(void);
  54. #ifdef __cplusplus
  55. }
  56. #endif
  57. #endif /* _FROM_ASM_ */
  58. #endif /* _BOARD_H_ */