board.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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 the Olimex MSP430-P1611 proto board.
  17. */
  18. /*
  19. * Board identifier.
  20. */
  21. #define BOARD_OLIMEX_MSP430_P1611
  22. #define BOARD_NAME "Olimex MSP430-P1611"
  23. /*
  24. * Clock constants.
  25. */
  26. #define LFXT1CLK 32768
  27. #define XT2CLK 8000000
  28. #define DCOCLK 750000
  29. /*
  30. * Pin definitions for the Olimex MSP430-P1611 board.
  31. */
  32. #define P3_O_TXD0 4
  33. #define P3_O_TXD0_MASK (1 << P3_O_TXD0)
  34. #define P3_I_RXD0 5
  35. #define P3_I_RXD0_MASK (1 << P3_I_RXD0)
  36. #define P6_O_LED 0
  37. #define P6_O_LED_MASK (1 << P6_O_LED)
  38. #define P6_I_BUTTON 1
  39. #define P6_I_BUTTON_MASK (1 << P6_I_BUTTON)
  40. /*
  41. * Initial I/O ports settings.
  42. */
  43. #define VAL_P1OUT 0x00
  44. #define VAL_P1DIR 0xFF
  45. #define VAL_P2OUT 0x00
  46. #define VAL_P2DIR 0xFF
  47. #define VAL_P3OUT P3_O_TXD0_MASK
  48. #define VAL_P3DIR ~P3_I_RXD0_MASK
  49. #define VAL_P4OUT 0x00
  50. #define VAL_P4DIR 0xFF
  51. #define VAL_P5OUT 0x00
  52. #define VAL_P5DIR 0xFF
  53. #define VAL_P6OUT P6_O_LED_MASK
  54. #define VAL_P6DIR ~P6_I_BUTTON_MASK
  55. #if !defined(_FROM_ASM_)
  56. #ifdef __cplusplus
  57. extern "C" {
  58. #endif
  59. void boardInit(void);
  60. #ifdef __cplusplus
  61. }
  62. #endif
  63. #endif /* _FROM_ASM_ */
  64. #endif /* _BOARD_H_ */