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.

spi_pins.h 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
  4. *
  5. * Based on Sprinter and grbl.
  6. * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
  7. *
  8. * This program is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #pragma once
  23. /**
  24. * Define SPI Pins: SCK, MISO, MOSI, SS
  25. */
  26. #if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__)
  27. #define AVR_SCK_PIN 13
  28. #define AVR_MISO_PIN 12
  29. #define AVR_MOSI_PIN 11
  30. #define AVR_SS_PIN 10
  31. #elif defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__) || defined(__AVR_ATmega1284P__)
  32. #define AVR_SCK_PIN 7
  33. #define AVR_MISO_PIN 6
  34. #define AVR_MOSI_PIN 5
  35. #define AVR_SS_PIN 4
  36. #elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
  37. #define AVR_SCK_PIN 52
  38. #define AVR_MISO_PIN 50
  39. #define AVR_MOSI_PIN 51
  40. #define AVR_SS_PIN 53
  41. #elif defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__)
  42. #define AVR_SCK_PIN 21
  43. #define AVR_MISO_PIN 23
  44. #define AVR_MOSI_PIN 22
  45. #define AVR_SS_PIN 20
  46. #elif defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
  47. #define AVR_SCK_PIN 10
  48. #define AVR_MISO_PIN 12
  49. #define AVR_MOSI_PIN 11
  50. #define AVR_SS_PIN 16
  51. #endif
  52. #ifndef SCK_PIN
  53. #define SCK_PIN AVR_SCK_PIN
  54. #endif
  55. #ifndef MISO_PIN
  56. #define MISO_PIN AVR_MISO_PIN
  57. #endif
  58. #ifndef MOSI_PIN
  59. #define MOSI_PIN AVR_MOSI_PIN
  60. #endif
  61. #ifndef SS_PIN
  62. #define SS_PIN AVR_SS_PIN
  63. #endif