Skip to content

Commit

Permalink
Public API documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
tzarc committed Apr 13, 2022
1 parent 6b233cc commit af11f6b
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 10 deletions.
18 changes: 16 additions & 2 deletions drivers/painter/gc9a01/qp_gc9a01.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,29 @@
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Quantum Painter GC9A01 configurables (add to your keyboard's config.h)

// The number of GC9A01 devices we're going to be talking to. If you have more than one display you need to increase it.
#ifndef GC9A01_NUM_DEVICES
/**
* @def This controls the maximum number of GC9A01 devices that Quantum Painter can communicate with at any one time.
* Increasing this number allows for multiple displays to be used.
*/
# define GC9A01_NUM_DEVICES 1
#endif

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Quantum Painter GC9A01 device factories

#ifdef QUANTUM_PAINTER_GC9A01_SPI_ENABLE
// Factory method for an GC9A01 SPI device
/**
* Factory method for an GC9A01 SPI LCD device.
*
* @param panel_width[in] the width of the display panel
* @param panel_height[in] the height of the display panel
* @param chip_select_pin[in] the GPIO pin used for SPI chip select
* @param dc_pin[in] the GPIO pin used for D/C control
* @param reset_pin[in] the GPIO pin used for RST
* @param spi_divisor[in] the SPI divisor to use when communicating with the display
* @param spi_mode[in] the SPI mode to use when communicating with the display
* @return the device handle used with all drawing routines in Quantum Painter
*/
painter_device_t qp_gc9a01_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);
#endif // QUANTUM_PAINTER_GC9A01_SPI_ENABLE
18 changes: 16 additions & 2 deletions drivers/painter/ili9xxx/qp_ili9163.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,29 @@
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Quantum Painter ILI9163 configurables (add to your keyboard's config.h)

// The number of ILI9163 devices we're going to be talking to. If you have more than one display you need to increase it.
#ifndef ILI9163_NUM_DEVICES
/**
* @def This controls the maximum number of ILI9163 devices that Quantum Painter can communicate with at any one time.
* Increasing this number allows for multiple displays to be used.
*/
# define ILI9163_NUM_DEVICES 1
#endif

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Quantum Painter ILI9163 device factories

#ifdef QUANTUM_PAINTER_ILI9163_SPI_ENABLE
// Factory method for an ILI9163 SPI device
/**
* Factory method for an ILI9163 SPI LCD device.
*
* @param panel_width[in] the width of the display panel
* @param panel_height[in] the height of the display panel
* @param chip_select_pin[in] the GPIO pin used for SPI chip select
* @param dc_pin[in] the GPIO pin used for D/C control
* @param reset_pin[in] the GPIO pin used for RST
* @param spi_divisor[in] the SPI divisor to use when communicating with the display
* @param spi_mode[in] the SPI mode to use when communicating with the display
* @return the device handle used with all drawing routines in Quantum Painter
*/
painter_device_t qp_ili9163_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);
#endif // QUANTUM_PAINTER_ILI9163_SPI_ENABLE
18 changes: 16 additions & 2 deletions drivers/painter/ili9xxx/qp_ili9341.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,29 @@
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Quantum Painter ILI9341 configurables (add to your keyboard's config.h)

// The number of ILI9341 devices we're going to be talking to. If you have more than one display you need to increase it.
#ifndef ILI9341_NUM_DEVICES
/**
* @def This controls the maximum number of ILI9341 devices that Quantum Painter can communicate with at any one time.
* Increasing this number allows for multiple displays to be used.
*/
# define ILI9341_NUM_DEVICES 1
#endif

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Quantum Painter ILI9341 device factories

#ifdef QUANTUM_PAINTER_ILI9341_SPI_ENABLE
// Factory method for an ILI9341 SPI device
/**
* Factory method for an ILI9341 SPI LCD device.
*
* @param panel_width[in] the width of the display panel
* @param panel_height[in] the height of the display panel
* @param chip_select_pin[in] the GPIO pin used for SPI chip select
* @param dc_pin[in] the GPIO pin used for D/C control
* @param reset_pin[in] the GPIO pin used for RST
* @param spi_divisor[in] the SPI divisor to use when communicating with the display
* @param spi_mode[in] the SPI mode to use when communicating with the display
* @return the device handle used with all drawing routines in Quantum Painter
*/
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);
#endif // QUANTUM_PAINTER_ILI9341_SPI_ENABLE
18 changes: 16 additions & 2 deletions drivers/painter/ssd1351/qp_ssd1351.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,29 @@
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Quantum Painter SSD1351 configurables (add to your keyboard's config.h)

// The number of SSD1351 devices we're going to be talking to. If you have more than one display you need to increase it.
#ifndef SSD1351_NUM_DEVICES
/**
* @def This controls the maximum number of SSD1351 devices that Quantum Painter can communicate with at any one time.
* Increasing this number allows for multiple displays to be used.
*/
# define SSD1351_NUM_DEVICES 1
#endif

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Quantum Painter SSD1351 device factories

#ifdef QUANTUM_PAINTER_SSD1351_SPI_ENABLE
// Factory method for an SSD1351 SPI device
/**
* Factory method for an SSD1351 SPI OLED device.
*
* @param panel_width[in] the width of the display panel
* @param panel_height[in] the height of the display panel
* @param chip_select_pin[in] the GPIO pin used for SPI chip select
* @param dc_pin[in] the GPIO pin used for D/C control
* @param reset_pin[in] the GPIO pin used for RST
* @param spi_divisor[in] the SPI divisor to use when communicating with the display
* @param spi_mode[in] the SPI mode to use when communicating with the display
* @return the device handle used with all drawing routines in Quantum Painter
*/
painter_device_t qp_ssd1351_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);
#endif // QUANTUM_PAINTER_SSD1351_SPI_ENABLE
18 changes: 16 additions & 2 deletions drivers/painter/st77xx/qp_st7789.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Quantum Painter ST7789 configurables (add to your keyboard's config.h)

// The number of ST7789 devices we're going to be talking to. If you have more than one display you need to increase it.
#ifndef ST7789_NUM_DEVICES
/**
* @def This controls the maximum number of ST7789 devices that Quantum Painter can communicate with at any one time.
* Increasing this number allows for multiple displays to be used.
*/
# define ST7789_NUM_DEVICES 1
#endif

Expand All @@ -25,6 +28,17 @@
// Quantum Painter ST7789 device factories

#ifdef QUANTUM_PAINTER_ST7789_SPI_ENABLE
// Factory method for an ST7789 SPI device
/**
* Factory method for an ST7789 SPI LCD device.
*
* @param panel_width[in] the width of the display panel
* @param panel_height[in] the height of the display panel
* @param chip_select_pin[in] the GPIO pin used for SPI chip select
* @param dc_pin[in] the GPIO pin used for D/C control
* @param reset_pin[in] the GPIO pin used for RST
* @param spi_divisor[in] the SPI divisor to use when communicating with the display
* @param spi_mode[in] the SPI mode to use when communicating with the display
* @return the device handle used with all drawing routines in Quantum Painter
*/
painter_device_t qp_st7789_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);
#endif // QUANTUM_PAINTER_ST7789_SPI_ENABLE

0 comments on commit af11f6b

Please sign in to comment.