aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSergey Alirzaev <zl29ah@gmail.com>2020-05-16 03:28:28 +0300
committerSteve Markgraf <steve@steve-m.de>2020-05-19 22:24:26 +0200
commitb82303f44fc8388817306235a673e0bfa671dd3f (patch)
treefdedc1bb6353e533d7823b56928a2274c6ea1c13 /include
parentf05c961455f2c9aabce71ec3d9592199b07c47da (diff)
downloadosmo-fl2k-b82303f44fc8388817306235a673e0bfa671dd3f.tar.gz
osmo-fl2k-b82303f44fc8388817306235a673e0bfa671dd3f.tar.bz2
osmo-fl2k-b82303f44fc8388817306235a673e0bfa671dd3f.zip
lib: implement enabling RGB332 mode
I've decided to provide a separate pointer for a raw buffer in case the library user comes up with a non-RGB332 use case that avoids byte rearrangement (and copying should be replaced with pulling from the user's pointer in this case)
Diffstat (limited to 'include')
-rw-r--r--include/osmo-fl2k.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/osmo-fl2k.h b/include/osmo-fl2k.h
index 02ad4ad..7aafc24 100644
--- a/include/osmo-fl2k.h
+++ b/include/osmo-fl2k.h
@@ -54,6 +54,7 @@ typedef struct fl2k_data_info {
char *r_buf; /* pointer to red buffer */
char *g_buf; /* pointer to green buffer */
char *b_buf; /* pointer to blue buffer */
+ char *raw_buf; /* pointer to pre-arranged buffer */
} fl2k_data_info_t;
typedef struct fl2k_dev fl2k_dev_t;
@@ -90,6 +91,14 @@ FL2K_API int fl2k_close(fl2k_dev_t *dev);
FL2K_API int fl2k_set_sample_rate(fl2k_dev_t *dev, uint32_t target_freq);
/*!
+ * Set RGB332 sample format
+ *
+ * \param dev the device handle given by fl2k_open()
+ * \return 0 on success
+ */
+FL2K_API int fl2k_set_rgb332(fl2k_dev_t *dev);
+
+/*!
* Get actual sample rate the device is configured to.
*
* \param dev the device handle given by fl2k_open()