diff options
| author | QMK Bot <hello@qmk.fm> | 2025-11-11 12:21:26 +0000 |
|---|---|---|
| committer | QMK Bot <hello@qmk.fm> | 2025-11-11 12:21:26 +0000 |
| commit | 019cba746d1408365b906fb9d6163d9b0ab204ec (patch) | |
| tree | bfbc4c305d5d6e95f69b0912a3b08b2a771090c1 /quantum | |
| parent | 28eeb92f8eec5b8268d2a74ad0561670d14e189a (diff) | |
| parent | e7ad19bb953c6f430fb3501386b96962dbe9912c (diff) | |
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'quantum')
| -rw-r--r-- | quantum/painter/qp_comms.c | 12 | ||||
| -rw-r--r-- | quantum/painter/qp_comms.h | 6 | ||||
| -rw-r--r-- | quantum/painter/qp_internal_driver.h | 6 |
3 files changed, 12 insertions, 12 deletions
diff --git a/quantum/painter/qp_comms.c b/quantum/painter/qp_comms.c index 63667783e1..402165b119 100644 --- a/quantum/painter/qp_comms.c +++ b/quantum/painter/qp_comms.c | |||
| @@ -49,15 +49,15 @@ uint32_t qp_comms_send(painter_device_t device, const void *data, uint32_t byte_ | |||
| 49 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 49 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 50 | // Comms APIs that use a D/C pin | 50 | // Comms APIs that use a D/C pin |
| 51 | 51 | ||
| 52 | void qp_comms_command(painter_device_t device, uint8_t cmd) { | 52 | bool qp_comms_command(painter_device_t device, uint8_t cmd) { |
| 53 | painter_driver_t * driver = (painter_driver_t *)device; | 53 | painter_driver_t * driver = (painter_driver_t *)device; |
| 54 | painter_comms_with_command_vtable_t *comms_vtable = (painter_comms_with_command_vtable_t *)driver->comms_vtable; | 54 | painter_comms_with_command_vtable_t *comms_vtable = (painter_comms_with_command_vtable_t *)driver->comms_vtable; |
| 55 | comms_vtable->send_command(device, cmd); | 55 | return comms_vtable->send_command(device, cmd); |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | void qp_comms_command_databyte(painter_device_t device, uint8_t cmd, uint8_t data) { | 58 | bool qp_comms_command_databyte(painter_device_t device, uint8_t cmd, uint8_t data) { |
| 59 | qp_comms_command(device, cmd); | 59 | qp_comms_command(device, cmd); |
| 60 | qp_comms_send(device, &data, sizeof(data)); | 60 | return qp_comms_send(device, &data, sizeof(data)); |
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | uint32_t qp_comms_command_databuf(painter_device_t device, uint8_t cmd, const void *data, uint32_t byte_count) { | 63 | uint32_t qp_comms_command_databuf(painter_device_t device, uint8_t cmd, const void *data, uint32_t byte_count) { |
| @@ -65,8 +65,8 @@ uint32_t qp_comms_command_databuf(painter_device_t device, uint8_t cmd, const vo | |||
| 65 | return qp_comms_send(device, data, byte_count); | 65 | return qp_comms_send(device, data, byte_count); |
| 66 | } | 66 | } |
| 67 | 67 | ||
| 68 | void qp_comms_bulk_command_sequence(painter_device_t device, const uint8_t *sequence, size_t sequence_len) { | 68 | bool qp_comms_bulk_command_sequence(painter_device_t device, const uint8_t *sequence, size_t sequence_len) { |
| 69 | painter_driver_t * driver = (painter_driver_t *)device; | 69 | painter_driver_t * driver = (painter_driver_t *)device; |
| 70 | painter_comms_with_command_vtable_t *comms_vtable = (painter_comms_with_command_vtable_t *)driver->comms_vtable; | 70 | painter_comms_with_command_vtable_t *comms_vtable = (painter_comms_with_command_vtable_t *)driver->comms_vtable; |
| 71 | comms_vtable->bulk_command_sequence(device, sequence, sequence_len); | 71 | return comms_vtable->bulk_command_sequence(device, sequence, sequence_len); |
| 72 | } | 72 | } |
diff --git a/quantum/painter/qp_comms.h b/quantum/painter/qp_comms.h index 8fbf25c201..dc5892b1bb 100644 --- a/quantum/painter/qp_comms.h +++ b/quantum/painter/qp_comms.h | |||
| @@ -19,7 +19,7 @@ uint32_t qp_comms_send(painter_device_t device, const void* data, uint32_t byte_ | |||
| 19 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// | 19 | //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
| 20 | // Comms APIs that use a D/C pin | 20 | // Comms APIs that use a D/C pin |
| 21 | 21 | ||
| 22 | void qp_comms_command(painter_device_t device, uint8_t cmd); | 22 | bool qp_comms_command(painter_device_t device, uint8_t cmd); |
| 23 | void qp_comms_command_databyte(painter_device_t device, uint8_t cmd, uint8_t data); | 23 | bool qp_comms_command_databyte(painter_device_t device, uint8_t cmd, uint8_t data); |
| 24 | uint32_t qp_comms_command_databuf(painter_device_t device, uint8_t cmd, const void* data, uint32_t byte_count); | 24 | uint32_t qp_comms_command_databuf(painter_device_t device, uint8_t cmd, const void* data, uint32_t byte_count); |
| 25 | void qp_comms_bulk_command_sequence(painter_device_t device, const uint8_t* sequence, size_t sequence_len); | 25 | bool qp_comms_bulk_command_sequence(painter_device_t device, const uint8_t* sequence, size_t sequence_len); |
diff --git a/quantum/painter/qp_internal_driver.h b/quantum/painter/qp_internal_driver.h index 69da966f8c..5b6efe2c83 100644 --- a/quantum/painter/qp_internal_driver.h +++ b/quantum/painter/qp_internal_driver.h | |||
| @@ -36,7 +36,7 @@ typedef struct painter_driver_vtable_t { | |||
| 36 | 36 | ||
| 37 | typedef bool (*painter_driver_comms_init_func)(painter_device_t device); | 37 | typedef bool (*painter_driver_comms_init_func)(painter_device_t device); |
| 38 | typedef bool (*painter_driver_comms_start_func)(painter_device_t device); | 38 | typedef bool (*painter_driver_comms_start_func)(painter_device_t device); |
| 39 | typedef void (*painter_driver_comms_stop_func)(painter_device_t device); | 39 | typedef bool (*painter_driver_comms_stop_func)(painter_device_t device); |
| 40 | typedef uint32_t (*painter_driver_comms_send_func)(painter_device_t device, const void *data, uint32_t byte_count); | 40 | typedef uint32_t (*painter_driver_comms_send_func)(painter_device_t device, const void *data, uint32_t byte_count); |
| 41 | 41 | ||
| 42 | typedef struct painter_comms_vtable_t { | 42 | typedef struct painter_comms_vtable_t { |
| @@ -46,8 +46,8 @@ typedef struct painter_comms_vtable_t { | |||
| 46 | painter_driver_comms_send_func comms_send; | 46 | painter_driver_comms_send_func comms_send; |
| 47 | } painter_comms_vtable_t; | 47 | } painter_comms_vtable_t; |
| 48 | 48 | ||
| 49 | typedef void (*painter_driver_comms_send_command_func)(painter_device_t device, uint8_t cmd); | 49 | typedef bool (*painter_driver_comms_send_command_func)(painter_device_t device, uint8_t cmd); |
| 50 | typedef void (*painter_driver_comms_bulk_command_sequence)(painter_device_t device, const uint8_t *sequence, size_t sequence_len); | 50 | typedef bool (*painter_driver_comms_bulk_command_sequence)(painter_device_t device, const uint8_t *sequence, size_t sequence_len); |
| 51 | 51 | ||
| 52 | typedef struct painter_comms_with_command_vtable_t { | 52 | typedef struct painter_comms_with_command_vtable_t { |
| 53 | painter_comms_vtable_t base; // must be first, so this object can be cast from the painter_comms_vtable_t* type | 53 | painter_comms_vtable_t base; // must be first, so this object can be cast from the painter_comms_vtable_t* type |
