My Marlin configs for Fabrikator Mini and CTC i3 Pro B
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

spi_pins.h 2.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /**
  2. * Marlin 3D Printer Firmware
  3. * Copyright (C) 2016 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. #ifndef SPI_PINS_H_
  20. #define SPI_PINS_H_
  21. /**
  22. * Define SPI Pins: SCK, MISO, MOSI, SS
  23. */
  24. #if defined(__AVR_ATmega168__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega328P__)
  25. #define AVR_SCK_PIN 13
  26. #define AVR_MISO_PIN 12
  27. #define AVR_MOSI_PIN 11
  28. #define AVR_SS_PIN 10
  29. #elif defined(__AVR_ATmega644__) || defined(__AVR_ATmega644P__) || defined(__AVR_ATmega644PA__) || defined(__AVR_ATmega1284P__)
  30. #define AVR_SCK_PIN 7
  31. #define AVR_MISO_PIN 6
  32. #define AVR_MOSI_PIN 5
  33. #define AVR_SS_PIN 4
  34. #elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__)
  35. #define AVR_SCK_PIN 52
  36. #define AVR_MISO_PIN 50
  37. #define AVR_MOSI_PIN 51
  38. #define AVR_SS_PIN 53
  39. #elif defined(__AVR_AT90USB1287__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__)
  40. #define AVR_SCK_PIN 21
  41. #define AVR_MISO_PIN 23
  42. #define AVR_MOSI_PIN 22
  43. #define AVR_SS_PIN 20
  44. #elif defined(__AVR_ATmega1281__) || defined(__AVR_ATmega2561__)
  45. #define AVR_SCK_PIN 10
  46. #define AVR_MISO_PIN 12
  47. #define AVR_MOSI_PIN 11
  48. #define AVR_SS_PIN 16
  49. #endif
  50. #ifndef SCK_PIN
  51. #define SCK_PIN AVR_SCK_PIN
  52. #endif
  53. #ifndef MISO_PIN
  54. #define MISO_PIN AVR_MISO_PIN
  55. #endif
  56. #ifndef MOSI_PIN
  57. #define MOSI_PIN AVR_MOSI_PIN
  58. #endif
  59. #ifndef SS_PIN
  60. #define SS_PIN AVR_SS_PIN
  61. #endif
  62. #endif /* SPI_PINS_H_ */