From af11f6b5802e1e75e9e5508cbee243cc2ec3cbe8 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Wed, 13 Apr 2022 13:45:10 +1000 Subject: [PATCH] Public API documentation. --- drivers/painter/gc9a01/qp_gc9a01.h | 18 ++++++++++++++++-- drivers/painter/ili9xxx/qp_ili9163.h | 18 ++++++++++++++++-- drivers/painter/ili9xxx/qp_ili9341.h | 18 ++++++++++++++++-- drivers/painter/ssd1351/qp_ssd1351.h | 18 ++++++++++++++++-- drivers/painter/st77xx/qp_st7789.h | 18 ++++++++++++++++-- 5 files changed, 80 insertions(+), 10 deletions(-) diff --git a/drivers/painter/gc9a01/qp_gc9a01.h b/drivers/painter/gc9a01/qp_gc9a01.h index 9d27148e8712..e2b193956405 100644 --- a/drivers/painter/gc9a01/qp_gc9a01.h +++ b/drivers/painter/gc9a01/qp_gc9a01.h @@ -9,8 +9,11 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 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 @@ -18,6 +21,17 @@ // 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 diff --git a/drivers/painter/ili9xxx/qp_ili9163.h b/drivers/painter/ili9xxx/qp_ili9163.h index 0d0e30ea97d4..88d23629a92a 100644 --- a/drivers/painter/ili9xxx/qp_ili9163.h +++ b/drivers/painter/ili9xxx/qp_ili9163.h @@ -9,8 +9,11 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 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 @@ -18,6 +21,17 @@ // 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 diff --git a/drivers/painter/ili9xxx/qp_ili9341.h b/drivers/painter/ili9xxx/qp_ili9341.h index 2e87cce5affe..28b0152a84cb 100644 --- a/drivers/painter/ili9xxx/qp_ili9341.h +++ b/drivers/painter/ili9xxx/qp_ili9341.h @@ -9,8 +9,11 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 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 @@ -18,6 +21,17 @@ // 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 diff --git a/drivers/painter/ssd1351/qp_ssd1351.h b/drivers/painter/ssd1351/qp_ssd1351.h index 3821a537ad87..0df34f204d5c 100644 --- a/drivers/painter/ssd1351/qp_ssd1351.h +++ b/drivers/painter/ssd1351/qp_ssd1351.h @@ -9,8 +9,11 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // 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 @@ -18,6 +21,17 @@ // 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 diff --git a/drivers/painter/st77xx/qp_st7789.h b/drivers/painter/st77xx/qp_st7789.h index 542223fdc71e..ec61f5d70b7e 100644 --- a/drivers/painter/st77xx/qp_st7789.h +++ b/drivers/painter/st77xx/qp_st7789.h @@ -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 @@ -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