board.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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 SAM7-P256 development board.
  17. */
  18. /*
  19. * Board identifier.
  20. */
  21. #define BOARD_OLIMEX_SAM7_P256
  22. /*
  23. * Select your platform by modifying the following line.
  24. */
  25. #if !defined(SAM7_PLATFORM)
  26. #define SAM7_PLATFORM SAM7S256
  27. #endif
  28. #include "at91sam7.h"
  29. #define CLK 18432000
  30. #define MCK 48054857
  31. /*
  32. * Initial I/O setup.
  33. */
  34. #define VAL_PIOA_ODSR 0x00000000 /* Output data. */
  35. #define VAL_PIOA_OSR 0x00000000 /* Direction. */
  36. #define VAL_PIOA_PUSR 0xFFFFFFFF /* Pull-up. */
  37. /*
  38. * I/O definitions.
  39. */
  40. #define PIOA_LED1 18
  41. #define PIOA_LED1_MASK (1 << PIOA_LED1_MASK)
  42. #define PIOA_LED2 17
  43. #define PIOA_LED2_MASK (1 << PIOA_LED2_MASK)
  44. #define PIOA_B1 19
  45. #define PIOA_B1_MASK (1 << PIOA_B1)
  46. #define PIOA_B2 20
  47. #define PIOA_B2_MASK (1 << PIOA_B2)
  48. #define PIOA_DP_PUP 25
  49. #define PIOA_DD_PUP_MASK (1 << PIOA_DP_PUP)
  50. #define PIOA_USB_D 26
  51. #define PIOA_USB_D_MASK (1 << PIOA_USB_D)
  52. #define PIOA_MMC_WP 25
  53. #define PIOA_MMC_WP_MASK (1 << PIOA_MMC_WP)
  54. #define PIOA_MMC_CP 15
  55. #define PIOA_MMC_CP_MASK (1 << PIOA_MMC_CP)
  56. #define PIOA_MMC_NPCS0 11
  57. #define PIOA_MMC_NPCS0_MASK (1 << PIOA_MMC_NPCS0_MASK)
  58. #if !defined(_FROM_ASM_)
  59. #ifdef __cplusplus
  60. extern "C" {
  61. #endif
  62. void boardInit(void);
  63. #ifdef __cplusplus
  64. }
  65. #endif
  66. #endif /* _FROM_ASM_ */
  67. #endif /* _BOARD_H_ */