aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends/openpixelcontrol.h
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2020-02-27 00:33:22 +0100
committercbdev <cb@cbcdn.com>2020-02-27 00:33:22 +0100
commite1fcd4d11cfdbad54470b2cce98d8b749464ec00 (patch)
tree1fc646402cca3934cd7fe87153a5f86fd9edf868 /backends/openpixelcontrol.h
parent1b3878956f02e274c480815774f9c6f39d65117f (diff)
downloadmidimonster-e1fcd4d11cfdbad54470b2cce98d8b749464ec00.tar.gz
midimonster-e1fcd4d11cfdbad54470b2cce98d8b749464ec00.tar.bz2
midimonster-e1fcd4d11cfdbad54470b2cce98d8b749464ec00.zip
Implement OpenPixelControl server mode (8bit)
Diffstat (limited to 'backends/openpixelcontrol.h')
-rw-r--r--backends/openpixelcontrol.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/backends/openpixelcontrol.h b/backends/openpixelcontrol.h
index f1061ea..658bbf0 100644
--- a/backends/openpixelcontrol.h
+++ b/backends/openpixelcontrol.h
@@ -31,6 +31,18 @@ typedef struct /*_openpixel_hdr*/ {
} openpixel_header;
#pragma pack(pop)
+typedef struct /*_openpixel_client*/ {
+ int fd;
+ ssize_t buffer;
+ openpixel_header hdr;
+ size_t offset;
+ size_t left;
+ union {
+ uint8_t u8[2];
+ uint16_t u16;
+ } boundary;
+} openpixel_client;
+
typedef struct {
enum {
rgb8 = 0,
@@ -43,6 +55,5 @@ typedef struct {
int dest_fd;
int listen_fd;
size_t clients;
- int* client_fd;
- size_t* bytes_left;
+ openpixel_client* client;
} openpixel_instance_data;