blacksasi_f411m.h 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. /******************************************************************************
  2. * The MIT License
  3. *
  4. * Copyright (c) 2011 LeafLabs, LLC.
  5. *
  6. * Permission is hereby granted, free of charge, to any person
  7. * obtaining a copy of this software and associated documentation
  8. * files (the "Software"), to deal in the Software without
  9. * restriction, including without limitation the rights to use, copy,
  10. * modify, merge, publish, distribute, sublicense, and/or sell copies
  11. * of the Software, and to permit persons to whom the Software is
  12. * furnished to do so, subject to the following conditions:
  13. *
  14. * The above copyright notice and this permission notice shall be
  15. * included in all copies or substantial portions of the Software.
  16. *
  17. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  18. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  19. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  20. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  21. * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  22. * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  23. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  24. * SOFTWARE.
  25. *****************************************************************************/
  26. /**
  27. * @file blacksasi_f411m.h
  28. * @author Per Mårtensson
  29. * @brief Private include file
  30. */
  31. #ifndef _BOARD_BLACKSASI_F411M_H_
  32. #define _BOARD_BLACKSASI_F411M_H_
  33. #define Port2Pin(port, bit) ((port-'A')*16+bit)
  34. #define CLOCK_SPEED_MHZ 96
  35. /*****************************************************************************/
  36. // Board pin definitions
  37. #define BOARD_USB_DM_PIN PA11
  38. #define BOARD_USB_DP_PIN PA12
  39. #define BOARD_LED_PIN PA4
  40. #define BOARD_LED1_PIN PA4
  41. #define BOARD_LED2_PIN PA5
  42. #define BOARD_LED3_PIN PA6
  43. #define BOARD_EXT_LED PA0
  44. #define BOARD_SWITCH1_PIN PC4
  45. #define BOARD_SWITCH2_PIN PC5
  46. #define BOARD_SWITCH3_PIN PC10
  47. #define BOARD_SWITCH4_PIN PC11
  48. #define BOARD_REV_PIN0 PA7
  49. #define BOARD_REV_PIN1 PA8
  50. #define BOARD_REV_PIN2 PA9
  51. #define BOARD_SDCARD_INSERT PB0
  52. #define BOARD_NR_USARTS 6
  53. #define BOARD_USART1_TX_PIN PA9
  54. #define BOARD_USART1_RX_PIN PA10
  55. #define BOARD_USART2_TX_PIN PA2
  56. #define BOARD_USART2_RX_PIN PA3
  57. #define BOARD_USART3_TX_PIN PB10
  58. #define BOARD_USART3_RX_PIN PB11
  59. #define BOARD_UART4_TX_PIN PA0
  60. #define BOARD_UART4_RX_PIN PA1
  61. #define BOARD_UART5_TX_PIN PC12
  62. #define BOARD_UART5_RX_PIN PD2
  63. #define BOARD_USART6_TX_PIN PC6
  64. #define BOARD_USART6_RX_PIN PC7
  65. #define BOARD_NR_I2C 0
  66. #define BOARD_NR_SPI 3
  67. #define BOARD_SPI1_NSS_PIN PB1
  68. #define BOARD_SPI1_SCK_PIN PB3
  69. #define BOARD_SPI1_MISO_PIN PB4
  70. #define BOARD_SPI1_MOSI_PIN PB5
  71. #define BOARD_SPI1A_NSS_PIN PB1
  72. #define BOARD_SPI1A_SCK_PIN PB3
  73. #define BOARD_SPI1A_MISO_PIN PB4
  74. #define BOARD_SPI1A_MOSI_PIN PB5
  75. #define BOARD_SPI2_NSS_PIN PB12
  76. #define BOARD_SPI2_SCK_PIN PB13
  77. #define BOARD_SPI2_MISO_PIN PB14
  78. #define BOARD_SPI2_MOSI_PIN PB15
  79. #define BOARD_SPI2A_NSS_PIN PB9
  80. #define BOARD_SPI2A_SCK_PIN PB10
  81. #define BOARD_SPI2A_MISO_PIN PC2
  82. #define BOARD_SPI2A_MOSI_PIN PC3
  83. #define BOARD_SPI3_NSS_PIN PA15
  84. #define BOARD_SPI3_SCK_PIN PD12
  85. #define BOARD_SPI3_MISO_PIN PD12
  86. #define BOARD_SPI3_MOSI_PIN PD12
  87. #define BOARD_SDIO_D0 PB15
  88. #define BOARD_SDIO_D1 PB10
  89. #define BOARD_SDIO_D2 PB13
  90. #define BOARD_SDIO_D3 PB15
  91. #define BOARD_SDIO_CLK PB15
  92. #define BOARD_SDIO_CMD PB15
  93. #define BOARD_SCSI_DBX PE0
  94. #define BOARD_SCSI_MSG PE2
  95. #define BOARD_SCSI_RST PA15
  96. #define BOARD_SCSI_SEL PE3
  97. #define BOARD_SCSI_CD PE4
  98. #define BOARD_SCSI_REQ PE5
  99. #define BOARD_SCSI_IO PE6
  100. #define BOARD_SCSI_DAT0 PD0
  101. #define BOARD_SCSI_DAT1 PD1
  102. #define BOARD_SCSI_DAT2 PD2
  103. #define BOARD_SCSI_DAT3 PD3
  104. #define BOARD_SCSI_DAT4 PD4
  105. #define BOARD_SCSI_DAT5 PD5
  106. #define BOARD_SCSI_DAT6 PD6
  107. #define BOARD_SCSI_DAT7 PD7
  108. #define BOARD_SCSI_DBP PD8
  109. #define BOARD_SCSI_BSY PB6
  110. #define BOARD_SCSI_ACK PB7
  111. #define BOARD_TRANS_OE PB12
  112. #define BOARD_SCSI_ATN PB14
  113. #define BOARD_SCSI_DTD PC0 // Needs to be on the same port as BOARD_SCSI_IND
  114. #define BOARD_SCSI_IND PC1 // Needs to be on the same port as BOARD_SCSI_DTD
  115. #define BOARD_SCSI_TAD PC2
  116. #define BOARD_SCSI_TERM_HIGH PB8 // Needs to be on the same port as BOARD_SCSI_TERM_LOW
  117. #define BOARD_SCSI_TERM_LOW PB9 // Needs to be on the same port as BOARD_SCSI_TERM_HIGH
  118. #define BOARD_SCSI_TERM_POWER PC8
  119. #define BOARD_NR_PWM_PINS 22
  120. #define BOARD_NR_ADC_PINS 16
  121. #define BOARD_NR_USED_PINS 22
  122. #define BOARD_JTMS_SWDIO_PIN PA13
  123. #define BOARD_JTCK_SWCLK_PIN PA14
  124. /*****************************************************************************/
  125. // Pins reserved for the on-board hardware
  126. #define USB_DM_PIN BOARD_USB_DM_PIN // PA11
  127. #define USB_DP_PIN BOARD_USB_DP_PIN // PA12
  128. /*
  129. /*****************************************************************************/
  130. enum {
  131. PA0,PA1,PA2,PA3,PA4,PA5,PA6,PA7,PA8,PA9,PA10,PA11,PA12,PA13,PA14,PA15,
  132. PB0,PB1,PB2,PB3,PB4,PB5,PB6,PB7,PB8,PB9,PB10,PB11,PB12,PB13,PB14,PB15,
  133. PC0,PC1,PC2,PC3,PC4,PC5,PC6,PC7,PC8,PC9,PC10,PC11,PC12,PC13,PC14,PC15,
  134. PD0,PD1,PD2,PD3,PD4,PD5,PD6,PD7,PD8,PD9,PD10,PD11,PD12,PD13,PD14,PD15,
  135. PE0,PE1,PE2,PE3,PE4,PE5,PE6,PE7,PE8,PE9,PE10,PE11,PE12,PE13,PE14,PE15,
  136. BOARD_NR_GPIO_PINS
  137. };
  138. #endif