board.h 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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 Embedded Artists LPCXpresso Base Board with LPC1114 daughter
  17. * board.
  18. */
  19. /*
  20. * Board identifiers.
  21. */
  22. #define BOARD_EA_BB_LPC11U14
  23. #define BOARD_NAME "Embedded Artists LPCXpresso Base Board + LPC11U14"
  24. /*
  25. * Board frequencies.
  26. */
  27. #define SYSOSCCLK 12000000
  28. /*
  29. * SCK0 connection on this board.
  30. */
  31. #define LPC11xx_SPI_SCK0_SELECTOR SCK0_IS_PIO2_11
  32. /*
  33. * GPIO 0 initial setup.
  34. */
  35. #define VAL_GPIO0DIR PAL_PORT_BIT(GPIO0_OLEDSEL) | \
  36. PAL_PORT_BIT(GPIO0_USB_DPCTL) | \
  37. PAL_PORT_BIT(GPIO0_LED2) | \
  38. PAL_PORT_BIT(GPIO0_LED3B) | \
  39. PAL_PORT_BIT(GPIO0_LED3R) | \
  40. PAL_PORT_BIT(GPIO0_LED3G) | \
  41. PAL_PORT_BIT(GPIO0_SPI0SEL)
  42. #define VAL_GPIO0DATA PAL_PORT_BIT(GPIO0_OLEDSEL) | \
  43. PAL_PORT_BIT(GPIO0_LED2) | \
  44. PAL_PORT_BIT(GPIO0_LED3B) | \
  45. PAL_PORT_BIT(GPIO0_LED3R) | \
  46. PAL_PORT_BIT(GPIO0_LED3G) | \
  47. PAL_PORT_BIT(GPIO0_SPI0SEL)
  48. /*
  49. * GPIO 1 initial setup.
  50. */
  51. #define VAL_GPIO1DIR 0x00000000
  52. #define VAL_GPIO1DATA 0x00000000
  53. /*
  54. * Pin definitions.
  55. */
  56. #define GPIO0_SW3 1
  57. #define GPIO0_OLEDSEL 2
  58. #define GPIO0_USB_VBUS 3
  59. #define GPIO0_USB_DPCTL 6
  60. #define GPIO0_LED2 7
  61. #define GPIO0_SW4 16
  62. #define GPIO0_LED3B 14
  63. #define GPIO0_LED3R 21
  64. #define GPIO0_LED3G 22
  65. #define GPIO0_SPI0SEL 23
  66. #if !defined(_FROM_ASM_)
  67. #ifdef __cplusplus
  68. extern "C" {
  69. #endif
  70. void boardInit(void);
  71. #ifdef __cplusplus
  72. }
  73. #endif
  74. #endif /* _FROM_ASM_ */
  75. #endif /* _BOARD_H_ */