board.h 1.6 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 a generic SPC564Axx proto board.
  17. */
  18. /*
  19. * Board identifiers.
  20. */
  21. #define BOARD_SPC564AXX_EVB
  22. #define BOARD_NAME "EVB with SPC564Axx Mini Module"
  23. /*
  24. * Device identifier.
  25. */
  26. #define _SPC564A80L7_
  27. /*
  28. * Board frequencies.
  29. */
  30. #if !defined(SPC5_XOSC_CLK)
  31. #define SPC5_XOSC_CLK 8000000
  32. #endif
  33. /*
  34. * I/O definitions.
  35. */
  36. #define P5_ESCI_A_TX 9
  37. #define P5_ESCI_A_RX 10
  38. #define P11_BUTTON1 3
  39. #define P11_BUTTON2 5
  40. #define P11_BUTTON3 7
  41. #define P11_BUTTON4 9
  42. #define P11_LED1 12
  43. #define P11_LED2 13
  44. #define P11_LED3 14
  45. #define P11_LED4 15
  46. /*
  47. * Support macros.
  48. */
  49. #define PCR(port, pin) (((port) * 16) + (pin))
  50. #if !defined(_FROM_ASM_)
  51. #ifdef __cplusplus
  52. extern "C" {
  53. #endif
  54. void boardInit(void);
  55. #ifdef __cplusplus
  56. }
  57. #endif
  58. #endif /* _FROM_ASM_ */
  59. #endif /* _BOARD_H_ */