My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

variant_MARLIN_STM32G0B1RE.h 7.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. /*
  2. *******************************************************************************
  3. * Copyright (c) 2020-2021, STMicroelectronics
  4. * All rights reserved.
  5. *
  6. * This software component is licensed by ST under BSD 3-Clause license,
  7. * the "License"; You may not use this file except in compliance with the
  8. * License. You may obtain a copy of the License at:
  9. * opensource.org/licenses/BSD-3-Clause
  10. *
  11. *******************************************************************************
  12. */
  13. #pragma once
  14. /*----------------------------------------------------------------------------
  15. * STM32 pins number
  16. *----------------------------------------------------------------------------*/
  17. #define PA0 PIN_A0
  18. #define PA1 PIN_A1
  19. #define PA2 PIN_A2
  20. #define PA3 PIN_A3
  21. #define PA4 PIN_A4
  22. #define PA5 PIN_A5
  23. #define PA6 PIN_A6
  24. #define PA7 PIN_A7
  25. #define PA8 8
  26. #define PA9 9
  27. #define PA10 10
  28. #define PA11 11
  29. #define PA12 12
  30. #define PA13 13
  31. #define PA14 14
  32. #define PA15 15
  33. #define PB0 PIN_A8
  34. #define PB1 PIN_A9
  35. #define PB2 PIN_A10
  36. #define PB3 19
  37. #define PB4 20
  38. #define PB5 21
  39. #define PB6 22
  40. #define PB7 23
  41. #define PB8 24
  42. #define PB9 25
  43. #define PB10 PIN_A11
  44. #define PB11 PIN_A12
  45. #define PB12 PIN_A13
  46. #define PB13 29
  47. #define PB14 30
  48. #define PB15 31
  49. #define PC0 32
  50. #define PC1 33
  51. #define PC2 34
  52. #define PC3 35
  53. #define PC4 PIN_A14
  54. #define PC5 PIN_A15
  55. #define PC6 38
  56. #define PC7 39
  57. #define PC8 40
  58. #define PC9 41
  59. #define PC10 42
  60. #define PC11 43
  61. #define PC12 44
  62. #define PC13 45
  63. #define PC14 46
  64. #define PC15 47
  65. #define PD0 48
  66. #define PD1 49
  67. #define PD2 50
  68. #define PD3 51
  69. #define PD4 52
  70. #define PD5 53
  71. #define PD6 54
  72. #define PD8 55
  73. #define PD9 56
  74. #define PF0 57
  75. #define PF1 58
  76. #define PF2 59
  77. #define PA9_R 60
  78. #define PA10_R 61
  79. // Alternate pins number
  80. #define PA1_ALT1 (PA1 | ALT1)
  81. #define PA2_ALT1 (PA2 | ALT1)
  82. #define PA3_ALT1 (PA3 | ALT1)
  83. #define PA4_ALT1 (PA4 | ALT1)
  84. #define PA6_ALT1 (PA6 | ALT1)
  85. #define PA6_ALT2 (PA6 | ALT2)
  86. #define PA7_ALT1 (PA7 | ALT1)
  87. #define PA7_ALT2 (PA7 | ALT2)
  88. #define PA7_ALT3 (PA7 | ALT3)
  89. #define PA9_ALT1 (PA9 | ALT1)
  90. #define PA9_R_ALT1 (PA9_R | ALT1)
  91. #define PA10_ALT1 (PA10 | ALT1)
  92. #define PA10_R_ALT1 (PA10_R | ALT1)
  93. #define PA14_ALT1 (PA14 | ALT1)
  94. #define PA15_ALT1 (PA15 | ALT1)
  95. #define PB0_ALT1 (PB0 | ALT1)
  96. #define PB1_ALT1 (PB1 | ALT1)
  97. #define PB1_ALT2 (PB1 | ALT2)
  98. #define PB3_ALT1 (PB3 | ALT1)
  99. #define PB4_ALT1 (PB4 | ALT1)
  100. #define PB5_ALT1 (PB5 | ALT1)
  101. #define PB6_ALT1 (PB6 | ALT1)
  102. #define PB6_ALT2 (PB6 | ALT2)
  103. #define PB7_ALT1 (PB7 | ALT1)
  104. #define PB8_ALT1 (PB8 | ALT1)
  105. #define PB9_ALT1 (PB9 | ALT1)
  106. #define PB13_ALT1 (PB13 | ALT1)
  107. #define PB14_ALT1 (PB14 | ALT1)
  108. #define PB15_ALT1 (PB15 | ALT1)
  109. #define PB15_ALT2 (PB15 | ALT2)
  110. #define PC0_ALT1 (PC0 | ALT1)
  111. #define PC1_ALT1 (PC1 | ALT1)
  112. #define PC4_ALT1 (PC4 | ALT1)
  113. #define PC5_ALT1 (PC5 | ALT1)
  114. #define PC6_ALT1 (PC6 | ALT1)
  115. #define PC7_ALT1 (PC7 | ALT1)
  116. #define PC8_ALT1 (PC8 | ALT1)
  117. #define PC9_ALT1 (PC9 | ALT1)
  118. #define PC10_ALT1 (PC10 | ALT1)
  119. #define PC11_ALT1 (PC11 | ALT1)
  120. #define PD4_ALT1 (PD4 | ALT1)
  121. #define NUM_DIGITAL_PINS 62
  122. #define NUM_REMAP_PINS 2
  123. #define NUM_ANALOG_INPUTS 16
  124. // SPI definitions
  125. #ifndef PIN_SPI_SS
  126. #define PIN_SPI_SS PA4
  127. #endif
  128. #ifndef PIN_SPI_MOSI
  129. #define PIN_SPI_MOSI PA7
  130. #endif
  131. #ifndef PIN_SPI_MISO
  132. #define PIN_SPI_MISO PA6
  133. #endif
  134. #ifndef PIN_SPI_SCK
  135. #define PIN_SPI_SCK PA5
  136. #endif
  137. // I2C definitions
  138. #ifndef PIN_WIRE_SDA
  139. #define PIN_WIRE_SDA PB6
  140. #endif
  141. #ifndef PIN_WIRE_SCL
  142. #define PIN_WIRE_SCL PB7
  143. #endif
  144. // Timer Definitions
  145. // Use TIM6/TIM7 when possible as servo and tone don't need GPIO output pin
  146. #ifndef TIMER_TONE
  147. #define TIMER_TONE TIM6
  148. #endif
  149. #ifndef TIMER_SERVO
  150. #define TIMER_SERVO TIM7
  151. #endif
  152. // UART Definitions
  153. #ifndef SERIAL_UART_INSTANCE
  154. #define SERIAL_UART_INSTANCE 2
  155. #endif
  156. // Default pin used for generic 'Serial' instance
  157. // Mandatory for Firmata
  158. #ifndef PIN_SERIAL_RX
  159. #define PIN_SERIAL_RX PA3
  160. #endif
  161. #ifndef PIN_SERIAL_TX
  162. #define PIN_SERIAL_TX PA2
  163. #endif
  164. /*----------------------------------------------------------------------------
  165. * Arduino objects - C++ only
  166. *----------------------------------------------------------------------------*/
  167. #ifdef __cplusplus
  168. // These serial port names are intended to allow libraries and architecture-neutral
  169. // sketches to automatically default to the correct port name for a particular type
  170. // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
  171. // the first hardware serial port whose RX/TX pins are not dedicated to another use.
  172. //
  173. // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
  174. //
  175. // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
  176. //
  177. // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
  178. //
  179. // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
  180. //
  181. // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
  182. // pins are NOT connected to anything by default.
  183. #ifndef SERIAL_PORT_MONITOR
  184. #define SERIAL_PORT_MONITOR Serial
  185. #endif
  186. #ifndef SERIAL_PORT_HARDWARE
  187. #define SERIAL_PORT_HARDWARE Serial2
  188. #endif
  189. #endif