diff options
author | Sergey Alirzaev <zl29ah@gmail.com> | 2020-05-16 03:28:29 +0300 |
---|---|---|
committer | Steve Markgraf <steve@steve-m.de> | 2020-05-19 22:24:26 +0200 |
commit | 3f44f8fc224c6b0b45a824109619f993e0b87552 (patch) | |
tree | a161ca1159ed62ae7cdbe1656736cbac6cfb819e /include | |
parent | b82303f44fc8388817306235a673e0bfa671dd3f (diff) | |
download | osmo-fl2k-3f44f8fc224c6b0b45a824109619f993e0b87552.tar.gz osmo-fl2k-3f44f8fc224c6b0b45a824109619f993e0b87552.tar.bz2 osmo-fl2k-3f44f8fc224c6b0b45a824109619f993e0b87552.zip |
lib: added utility macros for rgb332 mode
Diffstat (limited to 'include')
-rw-r--r-- | include/osmo-fl2k.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/osmo-fl2k.h b/include/osmo-fl2k.h index 7aafc24..f88ecdf 100644 --- a/include/osmo-fl2k.h +++ b/include/osmo-fl2k.h @@ -70,6 +70,13 @@ typedef struct fl2k_dev fl2k_dev_t; #define FL2K_BUF_LEN (1280 * 1024) #define FL2K_XFER_LEN (FL2K_BUF_LEN * 3) +/** Utility macros for 8 bit per sample mode */ +#define RGB332_TO_R(x) (((x) & 3) << 6) +#define RGB332_TO_G(x) (((x) & 7) << 3) +#define RGB332_TO_B(x) (((x) & 7) << 0) +#define RGB332_TO_RGB(r, g, b) (TO_R(r) | TO_G(g) | TO_B(b)) + + FL2K_API uint32_t fl2k_get_device_count(void); FL2K_API const char* fl2k_get_device_name(uint32_t index); |