diff options
author | cbdev <cb@cbcdn.com> | 2020-02-27 00:33:22 +0100 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2020-02-27 00:33:22 +0100 |
commit | e1fcd4d11cfdbad54470b2cce98d8b749464ec00 (patch) | |
tree | 1fc646402cca3934cd7fe87153a5f86fd9edf868 /backends/openpixelcontrol.h | |
parent | 1b3878956f02e274c480815774f9c6f39d65117f (diff) | |
download | midimonster-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.h | 15 |
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; |