My Marlin configs for Fabrikator Mini and CTC i3 Pro B
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * This program is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. *
  18. */
  19. #pragma once
  20. /**
  21. * HAL for stm32duino.com based on Libmaple and compatible (STM32F1)
  22. */
  23. /**
  24. * STM32F1 Default SPI Pins
  25. *
  26. * SS SCK MISO MOSI
  27. * +-----------------------------+
  28. * SPI1 | PA4 PA5 PA6 PA7 |
  29. * SPI2 | PB12 PB13 PB14 PB15 |
  30. * SPI3 | PA15 PB3 PB4 PB5 |
  31. * +-----------------------------+
  32. * Any pin can be used for Chip Select (SS_PIN)
  33. * SPI1 is enabled by default
  34. */
  35. #ifndef SCK_PIN
  36. #define SCK_PIN PA5
  37. #endif
  38. #ifndef MISO_PIN
  39. #define MISO_PIN PA6
  40. #endif
  41. #ifndef MOSI_PIN
  42. #define MOSI_PIN PA7
  43. #endif
  44. #ifndef SS_PIN
  45. #define SS_PIN PA4
  46. #endif
  47. #undef SDSS
  48. #define SDSS SS_PIN
  49. #if ENABLED(ENABLE_SPI3)
  50. #define SPI_DEVICE 3
  51. #elif ENABLED(ENABLE_SPI2)
  52. #define SPI_DEVICE 2
  53. #else
  54. #define SPI_DEVICE 1
  55. #endif