My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

variant.h 6.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. /*
  2. Copyright (c) 2011 Arduino. All right reserved.
  3. This library is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU Lesser General Public
  5. License as published by the Free Software Foundation; either
  6. version 2.1 of the License, or (at your option) any later version.
  7. This library is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. See the GNU Lesser General Public License for more details.
  11. You should have received a copy of the GNU Lesser General Public
  12. License along with this library; if not, write to the Free Software
  13. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  14. */
  15. #ifndef _VARIANT_ARDUINO_STM32_
  16. #define _VARIANT_ARDUINO_STM32_
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif // __cplusplus
  20. extern unsigned long myvar[];
  21. void myshow(int fre, int times);
  22. void debugStr(const char *str);
  23. /*----------------------------------------------------------------------------
  24. * Pins
  25. *----------------------------------------------------------------------------*/
  26. #define PA0 0x00
  27. #define PA1 0x01
  28. #define PA2 0x02
  29. #define PA3 0x03
  30. #define PA4 0x04
  31. #define PA5 0x05
  32. #define PA6 0x06
  33. #define PA7 0x07
  34. #define PA8 0x08
  35. #define PA9 0x09
  36. #define PA10 0x0A
  37. #define PA11 0x0B
  38. #define PA12 0x0C
  39. #define PA13 0x0D
  40. #define PA14 0x0E
  41. #define PA15 0x0F
  42. #define PB0 0x10
  43. #define PB1 0x11
  44. #define PB2 0x12
  45. #define PB3 0x13
  46. #define PB4 0x14
  47. #define PB5 0x15
  48. #define PB6 0x16
  49. #define PB7 0x17 // 36 pins (F103T)
  50. #define PB8 0x18
  51. #define PB9 0x19
  52. #define PB10 0x1A
  53. #define PB11 0x1B
  54. #define PB12 0x1C
  55. #define PB13 0x1D
  56. #define PB14 0x1E
  57. #define PB15 0x1F
  58. #define PC0 0x20
  59. #define PC1 0x21
  60. #define PC2 0x22
  61. #define PC3 0x23
  62. #define PC4 0x24
  63. #define PC5 0x25
  64. #define PC6 0x26
  65. #define PC7 0x27
  66. #define PC8 0x28
  67. #define PC9 0x29
  68. #define PC10 0x2A
  69. #define PC11 0x2B
  70. #define PC12 0x2C
  71. #define PC13 0x2D
  72. #define PC14 0x2E
  73. #define PC15 0x2F
  74. #define PD0 0x30
  75. #define PD1 0x31
  76. #define PD2 0x32 // 64 pins (F103R)
  77. #define PD3 0x33
  78. #define PD4 0x34
  79. #define PD5 0x35
  80. #define PD6 0x36
  81. #define PD7 0x37
  82. #define PD8 0x38
  83. #define PD9 0x39
  84. #define PD10 0x3A
  85. #define PD11 0x3B
  86. #define PD12 0x3C
  87. #define PD13 0x3D
  88. #define PD14 0x3E
  89. #define PD15 0x3F
  90. #define PE0 0x40
  91. #define PE1 0x41
  92. #define PE2 0x42
  93. #define PE3 0x43
  94. #define PE4 0x44
  95. #define PE5 0x45
  96. #define PE6 0x46
  97. #define PE7 0x47
  98. #define PE8 0x48
  99. #define PE9 0x49
  100. #define PE10 0x4A
  101. #define PE11 0x4B
  102. #define PE12 0x4C
  103. #define PE13 0x4D
  104. #define PE14 0x4E
  105. #define PE15 0x4F // 100 pins (F446V)
  106. #define PF0 0x50
  107. #define PF1 0x51
  108. #define PF2 0x52
  109. #define PF3 0x53
  110. #define PF4 0x54
  111. #define PF5 0x55
  112. #define PF6 0x56
  113. #define PF7 0x57
  114. #define PF8 0x58
  115. #define PF9 0x59
  116. #define PF10 0x5A
  117. #define PF11 0x5B
  118. #define PF12 0x5C
  119. #define PF13 0x5D
  120. #define PF14 0x5E
  121. #define PF15 0x5F
  122. #define PG0 0x60
  123. #define PG1 0x61
  124. #define PG2 0x62
  125. #define PG3 0x63
  126. #define PG4 0x64
  127. #define PG5 0x65
  128. #define PG6 0x66
  129. #define PG7 0x67
  130. #define PG8 0x68
  131. #define PG9 0x69
  132. #define PG10 0x6A
  133. #define PG11 0x6B
  134. #define PG12 0x6C
  135. #define PG13 0x6D
  136. #define PG14 0x6E
  137. #define PG15 0x6F
  138. #define PH0 0x70
  139. #define PH1 0x71
  140. #define PH2 0x72
  141. #define PH3 0x73
  142. #define PH4 0x74
  143. #define PH5 0x75
  144. #define PH6 0x76
  145. #define PH7 0x77
  146. #define PH8 0x78
  147. #define PH9 0x79
  148. #define PH10 0x7A
  149. #define PH11 0x7B
  150. #define PH12 0x7C
  151. #define PH13 0x7D
  152. #define PH14 0x7E
  153. #define PH15 0x7F // 144 pins (F446Z)
  154. // This must be a literal with the same value as PEND
  155. #define NUM_DIGITAL_PINS 0x80
  156. // This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS
  157. #define NUM_ANALOG_INPUTS 3
  158. #define NUM_ANALOG_FIRST 128
  159. // PWM resolution
  160. // #define PWM_RESOLUTION 12
  161. #define PWM_FREQUENCY 20000 // >= 20 Khz => inaudible noise for fans
  162. #define PWM_MAX_DUTY_CYCLE 255
  163. // SPI Definitions
  164. // #define PIN_SPI_SS PG15
  165. // #define PIN_SPI_MOSI PB5
  166. // #define PIN_SPI_MISO PB4
  167. // #define PIN_SPI_SCK PB3
  168. // I2C Definitions
  169. #define PIN_WIRE_SDA PB9
  170. #define PIN_WIRE_SCL PB8
  171. #define PIN_I2C_WP PB7
  172. #define EEPROM_DEVICE_ADDRESS 0x50
  173. // Timer Definitions
  174. // Do not use timer used by PWM pin. See PinMap_PWM.
  175. #define TIMER_TONE TIM8
  176. #define TIMER_SERVO TIM5
  177. #define TIMER_SERIAL TIM7
  178. // UART Definitions
  179. //#define SERIAL_UART_INSTANCE 1 // Connected to EXP3 header
  180. /* Enable Serial 3 */
  181. #define HAVE_HWSERIAL1
  182. // #define HAVE_HWSERIAL3
  183. // Default pin used for 'Serial' instance (ex: ST-Link)
  184. // Mandatory for Firmata
  185. #define PIN_SERIAL_RX PA10
  186. #define PIN_SERIAL_TX PA9
  187. /* HAL configuration */
  188. #define HSE_VALUE 8000000U
  189. #define FLASH_PAGE_SIZE (4U * 1024U)
  190. #ifdef __cplusplus
  191. } // extern "C"
  192. #endif
  193. /*----------------------------------------------------------------------------
  194. * Arduino objects - C++ only
  195. *----------------------------------------------------------------------------*/
  196. #ifdef __cplusplus
  197. // These serial port names are intended to allow libraries and architecture-neutral
  198. // sketches to automatically default to the correct port name for a particular type
  199. // of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
  200. // the first hardware serial port whose RX/TX pins are not dedicated to another use.
  201. //
  202. // SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor
  203. //
  204. // SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial
  205. //
  206. // SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library
  207. //
  208. // SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins.
  209. //
  210. // SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX
  211. // pins are NOT connected to anything by default.
  212. #define SERIAL_PORT_MONITOR Serial
  213. #define SERIAL_PORT_HARDWARE_OPEN Serial
  214. #endif
  215. #endif /* _VARIANT_ARDUINO_STM32_ */