diff options
Diffstat (limited to 'modules/ls0xx/ls0xx.h')
-rw-r--r-- | modules/ls0xx/ls0xx.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/modules/ls0xx/ls0xx.h b/modules/ls0xx/ls0xx.h new file mode 100644 index 0000000..49339e9 --- /dev/null +++ b/modules/ls0xx/ls0xx.h @@ -0,0 +1,27 @@ +// Copyright Pablo Martinez (@elpekenin) <[email protected]> +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include "qp.h" + +#ifndef LS0XX_NUM_DEVICES +#define LS0XX_NUM_DEVICES 1 +#endif + +/** + * Factory method for an LS0XX SPI device. + * + * Args: + * panel_width: Width of the display + * panel_height: Height of the display + * chip_select_pin: GPIO pin used for SPI chip select (CS) + * spi_divisor: SPI divisor to use when communicating with the display + * spi_mode: SPI mode to use when communicating with the display + * buf: Address of the buffer where data will be stored + */ +painter_device_t qp_ls0xx_device_t_make_spi_device(uint16_t panel_width, + uint16_t panel_height, + pin_t chip_select_pin, + uint16_t spi_divisor, + int spi_mode, void *buf); |