aboutsummaryrefslogtreecommitdiff
path: root/modules/ls0xx/ls0xx.h
blob: 49339e9eee6f6bddc2e5f3891da24a26b31f94c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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);