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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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. // 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. #elif defined(TARGET_LPC1768)
  68. uint8_t u8g_com_HAL_LPC1768_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
  69. uint8_t u8g_com_HAL_LPC1768_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
  70. uint8_t u8g_com_HAL_LPC1768_ST7920_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
  71. uint8_t u8g_com_HAL_LPC1768_ST7920_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
  72. uint8_t u8g_com_HAL_LPC1768_ssd_hw_i2c_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
  73. #define U8G_COM_HAL_SW_SPI_FN u8g_com_HAL_LPC1768_sw_spi_fn
  74. #define U8G_COM_HAL_HW_SPI_FN u8g_com_HAL_LPC1768_hw_spi_fn
  75. #define U8G_COM_ST7920_HAL_SW_SPI u8g_com_HAL_LPC1768_ST7920_sw_spi_fn
  76. #define U8G_COM_ST7920_HAL_HW_SPI u8g_com_HAL_LPC1768_ST7920_hw_spi_fn
  77. #define U8G_COM_SSD_I2C_HAL u8g_com_HAL_LPC1768_ssd_hw_i2c_fn
  78. #endif
  79. #ifndef U8G_COM_HAL_SW_SPI_FN
  80. #define U8G_COM_HAL_SW_SPI_FN u8g_com_null_fn
  81. #endif
  82. #ifndef U8G_COM_HAL_HW_SPI_FN
  83. #define U8G_COM_HAL_HW_SPI_FN u8g_com_null_fn
  84. #endif
  85. #ifndef U8G_COM_ST7920_HAL_SW_SPI
  86. #define U8G_COM_ST7920_HAL_SW_SPI u8g_com_null_fn
  87. #endif
  88. #ifndef U8G_COM_ST7920_HAL_HW_SPI
  89. #define U8G_COM_ST7920_HAL_HW_SPI u8g_com_null_fn
  90. #endif
  91. #ifndef U8G_COM_SSD_I2C_HAL
  92. #define U8G_COM_SSD_I2C_HAL u8g_com_null_fn
  93. #endif
  94. #if EITHER(FSMC_GRAPHICAL_TFT, SPI_GRAPHICAL_TFT)
  95. uint8_t u8g_com_hal_tft_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr);
  96. #define U8G_COM_HAL_TFT_FN u8g_com_hal_tft_fn
  97. #else
  98. #define U8G_COM_HAL_TFT_FN u8g_com_null_fn
  99. #endif