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.

37 lines
1.6 KiB

  1. // Copyright 2021 Nick Brassel (@tzarc)
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. #pragma once
  4. #include "gpio.h"
  5. #include "qp_internal.h"
  6. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  7. // Quantum Painter ILI9341 configurables (add to your keyboard's config.h)
  8. #ifndef ILI9341_NUM_DEVICES
  9. /**
  10. * @def This controls the maximum number of ILI9341 devices that Quantum Painter can communicate with at any one time.
  11. * Increasing this number allows for multiple displays to be used.
  12. */
  13. # define ILI9341_NUM_DEVICES 1
  14. #endif
  15. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  16. // Quantum Painter ILI9341 device factories
  17. #ifdef QUANTUM_PAINTER_ILI9341_SPI_ENABLE
  18. /**
  19. * Factory method for an ILI9341 SPI LCD device.
  20. *
  21. * @param panel_width[in] the width of the display panel
  22. * @param panel_height[in] the height of the display panel
  23. * @param chip_select_pin[in] the GPIO pin used for SPI chip select
  24. * @param dc_pin[in] the GPIO pin used for D/C control
  25. * @param reset_pin[in] the GPIO pin used for RST
  26. * @param spi_divisor[in] the SPI divisor to use when communicating with the display
  27. * @param spi_mode[in] the SPI mode to use when communicating with the display
  28. * @return the device handle used with all drawing routines in Quantum Painter
  29. */
  30. painter_device_t qp_ili9341_make_spi_device(uint16_t panel_width, uint16_t panel_height, pin_t chip_select_pin, pin_t dc_pin, pin_t reset_pin, uint16_t spi_divisor, int spi_mode);
  31. #endif // QUANTUM_PAINTER_ILI9341_SPI_ENABLE