board.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 SPC56ELxx board.
  17. */
  18. /*
  19. * Board identifiers.
  20. */
  21. #define BOARD_SPC56ELXX_EVB
  22. #define BOARD_NAME "EVB with SPC56ELxx Mini Module"
  23. /*
  24. * Board frequencies.
  25. */
  26. #if !defined(SPC5_XOSC_CLK)
  27. #define SPC5_XOSC_CLK 40000000
  28. #endif
  29. /*
  30. * I/O definitions.
  31. */
  32. #define PB_LIN0_TDX 2
  33. #define PB_LIN0_RDX 3
  34. #define PD_BUTTON1 0
  35. #define PD_BUTTON2 1
  36. #define PD_BUTTON3 2
  37. #define PD_BUTTON4 3
  38. #define PD_LED1 4
  39. #define PD_LED2 5
  40. #define PD_LED3 6
  41. #define PD_LED4 7
  42. /*
  43. * Support macros.
  44. */
  45. #define PCR(port, pin) (((port) * 16) + (pin))
  46. #if !defined(_FROM_ASM_)
  47. #ifdef __cplusplus
  48. extern "C" {
  49. #endif
  50. void boardInit(void);
  51. #ifdef __cplusplus
  52. }
  53. #endif
  54. #endif /* _FROM_ASM_ */
  55. #endif /* _BOARD_H_ */