summaryrefslogtreecommitdiff
path: root/quantum/painter/qp_comms.h
diff options
context:
space:
mode:
authorDrashna Jael're <drashna@live.com>2022-05-29 15:38:33 -0700
committerDrashna Jael're <drashna@live.com>2022-05-29 15:38:33 -0700
commit30aac80d5a6d8c6f7c06efb49189d748e70edc4a (patch)
treeceb11968ae41228e4b110c07467cdca7cc9cff22 /quantum/painter/qp_comms.h
parent67f4e5f34489abf986dedb4984b256692086c615 (diff)
parente22a183329fd05d39f88bb9dfebe98cfa7cd8402 (diff)
Merge remote-tracking branch 'qmk 0.17.0' into firmware21
Diffstat (limited to 'quantum/painter/qp_comms.h')
-rw-r--r--quantum/painter/qp_comms.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/quantum/painter/qp_comms.h b/quantum/painter/qp_comms.h
new file mode 100644
index 0000000000..8fbf25c201
--- /dev/null
+++ b/quantum/painter/qp_comms.h
@@ -0,0 +1,25 @@
+// Copyright 2021 Nick Brassel (@tzarc)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include <stdbool.h>
+#include <stdlib.h>
+
+#include "qp_internal.h"
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// Base comms APIs
+
+bool qp_comms_init(painter_device_t device);
+bool qp_comms_start(painter_device_t device);
+void qp_comms_stop(painter_device_t device);
+uint32_t qp_comms_send(painter_device_t device, const void* data, uint32_t byte_count);
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// 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);
+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);