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.

HAL_LCD_com_defines.h 4.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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 <http://www.gnu.org/licenses/>.
  20. *
  21. */
  22. #pragma once
  23. // Use this file to select the com driver for device drivers that are NOT in the U8G library
  24. #include <U8glib.h>
  25. #ifndef U8G_HAL_LINKS // Defined by LPC1768/9 environments in platform.ini
  26. #ifdef __SAM3X8E__
  27. uint8_t u8g_com_HAL_DUE_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
  28. uint8_t u8g_com_HAL_DUE_shared_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
  29. uint8_t u8g_com_HAL_DUE_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
  30. #define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_DUE_sw_spi_fn
  31. #define U8G_COM_HAL_HW_SPI_FN u8g_com_HAL_DUE_shared_hw_spi_fn
  32. #define U8G_COM_ST7920_HAL_SW_SPI u8g_com_HAL_DUE_ST7920_sw_spi_fn
  33. #elif defined(__SAMD51__)
  34. #define U8G_COM_HAL_HW_SPI_FN u8g_com_samd51_hw_spi_fn
  35. #define U8G_COM_ST7920_HAL_HW_SPI u8g_com_samd51_st7920_hw_spi_fn
  36. #elif defined(__STM32F1__)
  37. uint8_t u8g_com_HAL_STM32F1_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
  38. uint8_t u8g_com_stm32duino_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
  39. #define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_STM32F1_sw_spi_fn
  40. #define U8G_COM_HAL_HW_SPI_FN u8g_com_stm32duino_hw_spi_fn
  41. #define U8G_COM_ST7920_HAL_SW_SPI u8g_com_std_sw_spi_fn
  42. #define U8G_COM_ST7920_HAL_HW_SPI u8g_com_stm32duino_hw_spi_fn
  43. #elif defined(ARDUINO_ARCH_STM32)
  44. uint8_t u8g_com_stm32duino_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
  45. #define U8G_COM_HAL_HW_SPI_FN u8g_com_stm32duino_hw_spi_fn
  46. #elif defined(__AVR__)
  47. uint8_t u8g_com_HAL_AVR_sw_sp_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
  48. #define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_AVR_sw_sp_fn
  49. #endif
  50. #ifndef U8G_COM_HAL_SW_SPI_FN
  51. #define U8G_COM_HAL_SW_SPI_FN u8g_com_arduino_std_sw_spi_fn
  52. #endif
  53. #ifndef U8G_COM_HAL_HW_SPI_FN
  54. #define U8G_COM_HAL_HW_SPI_FN u8g_com_arduino_hw_spi_fn
  55. #endif
  56. #ifndef U8G_COM_ST7920_HAL_SW_SPI
  57. #define U8G_COM_ST7920_HAL_SW_SPI u8g_com_arduino_st7920_spi_fn
  58. #endif
  59. #ifndef U8G_COM_ST7920_HAL_HW_SPI
  60. #define U8G_COM_ST7920_HAL_HW_SPI u8g_com_arduino_st7920_hw_spi_fn
  61. #endif
  62. // This can't be invoked from the current platformio.ini
  63. #ifdef TARGET_LPC1768
  64. uint8_t u8g_com_HAL_LPC1768_ssd_hw_i2c_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
  65. #endif
  66. #define U8G_COM_SSD_I2C_HAL u8g_com_arduino_ssd_i2c_fn
  67. #if PIN_EXISTS(FSMC_CS)
  68. uint8_t u8g_com_stm32duino_fsmc_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
  69. #define U8G_COM_HAL_FSMC_FN u8g_com_stm32duino_fsmc_fn
  70. #endif
  71. #elif defined(TARGET_LPC1768)
  72. uint8_t u8g_com_HAL_LPC1768_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
  73. uint8_t u8g_com_HAL_LPC1768_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
  74. uint8_t u8g_com_HAL_LPC1768_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
  75. uint8_t u8g_com_HAL_LPC1768_ST7920_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
  76. uint8_t u8g_com_HAL_LPC1768_ssd_hw_i2c_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
  77. #define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_LPC1768_sw_spi_fn
  78. #define U8G_COM_HAL_HW_SPI_FN u8g_com_HAL_LPC1768_hw_spi_fn
  79. #define U8G_COM_ST7920_HAL_SW_SPI u8g_com_HAL_LPC1768_ST7920_sw_spi_fn
  80. #define U8G_COM_ST7920_HAL_HW_SPI u8g_com_HAL_LPC1768_ST7920_hw_spi_fn
  81. #define U8G_COM_SSD_I2C_HAL u8g_com_HAL_LPC1768_ssd_hw_i2c_fn
  82. #endif
  83. #ifndef U8G_COM_HAL_SW_SPI_FN
  84. #define U8G_COM_HAL_SW_SPI_FN u8g_com_null_fn
  85. #endif
  86. #ifndef U8G_COM_HAL_HW_SPI_FN
  87. #define U8G_COM_HAL_HW_SPI_FN u8g_com_null_fn
  88. #endif
  89. #ifndef U8G_COM_ST7920_HAL_SW_SPI
  90. #define U8G_COM_ST7920_HAL_SW_SPI u8g_com_null_fn
  91. #endif
  92. #ifndef U8G_COM_ST7920_HAL_HW_SPI
  93. #define U8G_COM_ST7920_HAL_HW_SPI u8g_com_null_fn
  94. #endif
  95. #ifndef U8G_COM_SSD_I2C_HAL
  96. #define U8G_COM_SSD_I2C_HAL u8g_com_null_fn
  97. #endif
  98. #ifndef U8G_COM_HAL_FSMC_FN
  99. #define U8G_COM_HAL_FSMC_FN u8g_com_null_fn
  100. #endif