aboutsummaryrefslogtreecommitdiffstats
path: root/quantum/painter
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/painter')
-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_
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Comms APIs that use a D/C pin
-void qp_comms_command(painter_device_t device, uint8_t cmd) {
+bool qp_comms_command(painter_device_t device, uint8_t cmd) {
painter_driver_t * driver = (painter_driver_t *)device;
painter_comms_with_command_vtable_t *comms_vtable = (painter_comms_with_command_vtable_t *)driver->comms_vtable;
- comms_vtable->send_command(device, cmd);
+ return comms_vtable->send_command(device, cmd);
}
-void qp_comms_command_databyte(painter_device_t device, uint8_t cmd, uint8_t data) {
+bool qp_comms_command_databyte(painter_device_t device, uint8_t cmd, uint8_t data) {
qp_comms_command(device, cmd);
- qp_comms_send(device, &data, sizeof(data));
+ return qp_comms_send(device, &data, sizeof(data));
}
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
return qp_comms_send(device, data, byte_count);
}
-void qp_comms_bulk_command_sequence(painter_device_t device, const uint8_t *sequence, size_t sequence_len) {
+bool qp_comms_bulk_command_sequence(painter_device_t device, const uint8_t *sequence, size_t sequence_len) {
painter_driver_t * driver = (painter_driver_t *)device;
painter_comms_with_command_vtable_t *comms_vtable = (painter_comms_with_command_vtable_t *)driver->comms_vtable;
- comms_vtable->bulk_command_sequence(device, sequence, sequence_len);
+ return comms_vtable->bulk_command_sequence(device, sequence, sequence_len);
}
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_
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Comms APIs that use a D/C pin
-void qp_comms_command(painter_device_t device, uint8_t cmd);
-void qp_comms_command_databyte(painter_device_t device, uint8_t cmd, uint8_t data);
+bool qp_comms_command(painter_device_t device, uint8_t cmd);
+bool qp_comms_command_databyte(painter_device_t device, uint8_t cmd, uint8_t data);
uint32_t qp_comms_command_databuf(painter_device_t device, uint8_t cmd, const void* data, uint32_t byte_count);
-void qp_comms_bulk_command_sequence(painter_device_t device, const uint8_t* sequence, size_t sequence_len);
+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 {
typedef bool (*painter_driver_comms_init_func)(painter_device_t device);
typedef bool (*painter_driver_comms_start_func)(painter_device_t device);
-typedef void (*painter_driver_comms_stop_func)(painter_device_t device);
+typedef bool (*painter_driver_comms_stop_func)(painter_device_t device);
typedef uint32_t (*painter_driver_comms_send_func)(painter_device_t device, const void *data, uint32_t byte_count);
typedef struct painter_comms_vtable_t {
@@ -46,8 +46,8 @@ typedef struct painter_comms_vtable_t {
painter_driver_comms_send_func comms_send;
} painter_comms_vtable_t;
-typedef void (*painter_driver_comms_send_command_func)(painter_device_t device, uint8_t cmd);
-typedef void (*painter_driver_comms_bulk_command_sequence)(painter_device_t device, const uint8_t *sequence, size_t sequence_len);
+typedef bool (*painter_driver_comms_send_command_func)(painter_device_t device, uint8_t cmd);
+typedef bool (*painter_driver_comms_bulk_command_sequence)(painter_device_t device, const uint8_t *sequence, size_t sequence_len);
typedef struct painter_comms_with_command_vtable_t {
painter_comms_vtable_t base; // must be first, so this object can be cast from the painter_comms_vtable_t* type