From abc1700eee53bd6dfd3e1d70736256bb02c0a115 Mon Sep 17 00:00:00 2001 From: cbdev Date: Tue, 11 Jul 2017 16:00:57 +0200 Subject: Implement ArtNet wide (16bit) channel support (Fixes #4) --- artnet.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'artnet.h') diff --git a/artnet.h b/artnet.h index 3633e81..6b4dee4 100644 --- a/artnet.h +++ b/artnet.h @@ -16,11 +16,21 @@ static int artnet_shutdown(); #define ARTNET_RECV_BUF 4096 #define ARTNET_KEEPALIVE_INTERVAL 15e5 +#define MAP_COARSE 0x0200 +#define MAP_FINE 0x0400 +#define MAP_SINGLE 0x0800 +#define MAP_MARK 0x1000 +#define MAPPED_CHANNEL(a) ((a) & 0x01FF) +#define IS_ACTIVE(a) ((a) & 0xFE00) +#define IS_WIDE(a) ((a) & 0x0600) +#define IS_SINGLE(a) ((a) & MAP_SINGLE) + typedef struct /*_artnet_universe_model*/ { uint8_t last_frame; uint8_t seq; uint8_t in[512]; uint8_t out[512]; + uint16_t map[512]; } artnet_universe; typedef struct /*_artnet_instance_model*/ { -- cgit v1.2.3