board.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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 SPC560B/Cxx proto board.
  17. */
  18. /*
  19. * Board identifiers.
  20. */
  21. #define BOARD_GENERIC_SPC560BC
  22. #define BOARD_NAME "Generic SPC560B/Cxx"
  23. /*
  24. * Board frequencies.
  25. */
  26. #if !defined(SPC5_XOSC_CLK)
  27. #define SPC5_XOSC_CLK 8000000
  28. #endif
  29. /*
  30. * I/O definitions.
  31. */
  32. #define PB_LIN0_TDX 2
  33. #define PB_LIN0_RDX 3
  34. #define PE_BUTTON1 0
  35. #define PE_BUTTON2 1
  36. #define PE_BUTTON3 2
  37. #define PE_BUTTON4 3
  38. #define PE_LED1 4
  39. #define PE_LED2 5
  40. #define PE_LED3 6
  41. #define PE_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_ */