board.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 SPC560Bxx proto board.
  17. */
  18. /*
  19. * Board identifiers.
  20. */
  21. #define BOARD_GENERIC_SPC560BC
  22. #define BOARD_NAME "EVB with SPC560Bxx Mini Module"
  23. /*
  24. * Device identifier.
  25. */
  26. #define _SPC560B60L7_
  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 PB_LIN0_TDX 2
  37. #define PB_LIN0_RDX 3
  38. #define PE_BUTTON1 0
  39. #define PE_BUTTON2 1
  40. #define PE_BUTTON3 2
  41. #define PE_BUTTON4 3
  42. #define PE_LED1 4
  43. #define PE_LED2 5
  44. #define PE_LED3 6
  45. #define PE_LED4 7
  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_ */