summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
Diffstat (limited to 'quantum')
-rw-r--r--quantum/painter/qp_comms.c12
-rw-r--r--quantum/painter/qp_comms.h6
-rw-r--r--quantum/painter/qp_internal_driver.h6
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
52void qp_comms_command(painter_device_t device, uint8_t cmd) { 52bool 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
58void qp_comms_command_databyte(painter_device_t device, uint8_t cmd, uint8_t data) { 58bool 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
63uint32_t qp_comms_command_databuf(painter_device_t device, uint8_t cmd, const void *data, uint32_t byte_count) { 63uint32_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
68void qp_comms_bulk_command_sequence(painter_device_t device, const uint8_t *sequence, size_t sequence_len) { 68bool 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
22void qp_comms_command(painter_device_t device, uint8_t cmd); 22bool qp_comms_command(painter_device_t device, uint8_t cmd);
23void qp_comms_command_databyte(painter_device_t device, uint8_t cmd, uint8_t data); 23bool qp_comms_command_databyte(painter_device_t device, uint8_t cmd, uint8_t data);
24uint32_t qp_comms_command_databuf(painter_device_t device, uint8_t cmd, const void* data, uint32_t byte_count); 24uint32_t qp_comms_command_databuf(painter_device_t device, uint8_t cmd, const void* data, uint32_t byte_count);
25void qp_comms_bulk_command_sequence(painter_device_t device, const uint8_t* sequence, size_t sequence_len); 25bool 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
37typedef bool (*painter_driver_comms_init_func)(painter_device_t device); 37typedef bool (*painter_driver_comms_init_func)(painter_device_t device);
38typedef bool (*painter_driver_comms_start_func)(painter_device_t device); 38typedef bool (*painter_driver_comms_start_func)(painter_device_t device);
39typedef void (*painter_driver_comms_stop_func)(painter_device_t device); 39typedef bool (*painter_driver_comms_stop_func)(painter_device_t device);
40typedef uint32_t (*painter_driver_comms_send_func)(painter_device_t device, const void *data, uint32_t byte_count); 40typedef uint32_t (*painter_driver_comms_send_func)(painter_device_t device, const void *data, uint32_t byte_count);
41 41
42typedef struct painter_comms_vtable_t { 42typedef 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
49typedef void (*painter_driver_comms_send_command_func)(painter_device_t device, uint8_t cmd); 49typedef bool (*painter_driver_comms_send_command_func)(painter_device_t device, uint8_t cmd);
50typedef void (*painter_driver_comms_bulk_command_sequence)(painter_device_t device, const uint8_t *sequence, size_t sequence_len); 50typedef bool (*painter_driver_comms_bulk_command_sequence)(painter_device_t device, const uint8_t *sequence, size_t sequence_len);
51 51
52typedef struct painter_comms_with_command_vtable_t { 52typedef 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