diff options
author | Pablo MartÃnez <58857054+elpekenin@users.noreply.github.com> | 2023-03-25 18:56:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-25 18:56:04 +0100 |
commit | cd542a0f6767231d73386c0913a9d2ee062ccf80 (patch) | |
tree | 43e5328aeb8fee3e2e9e06daee4aad7f47ca73fa /drivers/painter/comms/qp_comms_spi.h | |
parent | e640fd65fffd6332fbdddde06194dcfa6ce4fb52 (diff) |
[Cleanup] Quantum Painter (#19825)
Co-authored-by: Nick Brassel <nick@tzarc.org>
Diffstat (limited to 'drivers/painter/comms/qp_comms_spi.h')
-rw-r--r-- | drivers/painter/comms/qp_comms_spi.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/painter/comms/qp_comms_spi.h b/drivers/painter/comms/qp_comms_spi.h index 9989987327..b3da86d573 100644 --- a/drivers/painter/comms/qp_comms_spi.h +++ b/drivers/painter/comms/qp_comms_spi.h @@ -13,36 +13,36 @@ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Base SPI support -struct qp_comms_spi_config_t { +typedef struct qp_comms_spi_config_t { pin_t chip_select_pin; uint16_t divisor; bool lsb_first; int8_t mode; -}; +} qp_comms_spi_config_t; bool qp_comms_spi_init(painter_device_t device); bool qp_comms_spi_start(painter_device_t device); uint32_t qp_comms_spi_send_data(painter_device_t device, const void* data, uint32_t byte_count); void qp_comms_spi_stop(painter_device_t device); -extern const struct painter_comms_vtable_t spi_comms_vtable; +extern const painter_comms_vtable_t spi_comms_vtable; //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // SPI with D/C and RST pins # ifdef QUANTUM_PAINTER_SPI_DC_RESET_ENABLE -struct qp_comms_spi_dc_reset_config_t { - struct qp_comms_spi_config_t spi_config; - pin_t dc_pin; - pin_t reset_pin; -}; +typedef struct qp_comms_spi_dc_reset_config_t { + qp_comms_spi_config_t spi_config; + pin_t dc_pin; + pin_t reset_pin; +} qp_comms_spi_dc_reset_config_t; void qp_comms_spi_dc_reset_send_command(painter_device_t device, uint8_t cmd); uint32_t qp_comms_spi_dc_reset_send_data(painter_device_t device, const void* data, uint32_t byte_count); void qp_comms_spi_dc_reset_bulk_command_sequence(painter_device_t device, const uint8_t* sequence, size_t sequence_len); -extern const struct painter_comms_with_command_vtable_t spi_comms_with_dc_vtable; +extern const painter_comms_with_command_vtable_t spi_comms_with_dc_vtable; # endif // QUANTUM_PAINTER_SPI_DC_RESET_ENABLE |