[QP] Add support for OLED, variable framebuffer bpp (#19997)
Co-authored-by: Pablo Martínez <58857054+elpekenin@users.noreply.github.com> Co-authored-by: Dasky <32983009+daskygit@users.noreply.github.com> Fixup delta frame coordinates after #20296.
This commit is contained in:
parent
48d9140cfc
commit
8e614250b4
51 changed files with 1610 additions and 497 deletions
|
@ -105,13 +105,21 @@ void qp_comms_spi_dc_reset_send_command(painter_device_t device, uint8_t cmd) {
|
|||
}
|
||||
|
||||
void qp_comms_spi_dc_reset_bulk_command_sequence(painter_device_t device, const uint8_t *sequence, size_t sequence_len) {
|
||||
painter_driver_t * driver = (painter_driver_t *)device;
|
||||
qp_comms_spi_dc_reset_config_t *comms_config = (qp_comms_spi_dc_reset_config_t *)driver->comms_config;
|
||||
for (size_t i = 0; i < sequence_len;) {
|
||||
uint8_t command = sequence[i];
|
||||
uint8_t delay = sequence[i + 1];
|
||||
uint8_t num_bytes = sequence[i + 2];
|
||||
qp_comms_spi_dc_reset_send_command(device, command);
|
||||
if (num_bytes > 0) {
|
||||
qp_comms_spi_dc_reset_send_data(device, &sequence[i + 3], num_bytes);
|
||||
if (comms_config->command_params_uses_command_pin) {
|
||||
for (uint8_t j = 0; j < num_bytes; j++) {
|
||||
qp_comms_spi_dc_reset_send_command(device, sequence[i + 3 + j]);
|
||||
}
|
||||
} else {
|
||||
qp_comms_spi_dc_reset_send_data(device, &sequence[i + 3], num_bytes);
|
||||
}
|
||||
}
|
||||
if (delay > 0) {
|
||||
wait_ms(delay);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue