summaryrefslogtreecommitdiff
path: root/examples/device/cdc_uac2/src/common.h
diff options
context:
space:
mode:
authorAngel Molina <[email protected]>2022-10-21 19:35:15 +0200
committerDhiru Kholia <[email protected]>2023-06-19 16:00:03 +0530
commit3d685fe7f2f383b10a2ed86d33d4b97781843f0d (patch)
treedc38e7543ee6f884328e1f0259f1ae0fbf8c37ec /examples/device/cdc_uac2/src/common.h
parent13bb132044e0788d93761c0bc833196f8c6c1345 (diff)
Add CDC+UAC2 composite device example for Pico
Signed-off-by: Dhiru Kholia <[email protected]>
Diffstat (limited to 'examples/device/cdc_uac2/src/common.h')
-rw-r--r--examples/device/cdc_uac2/src/common.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/examples/device/cdc_uac2/src/common.h b/examples/device/cdc_uac2/src/common.h
new file mode 100644
index 000000000..f281024c7
--- /dev/null
+++ b/examples/device/cdc_uac2/src/common.h
@@ -0,0 +1,34 @@
+#ifndef __COMMON_H__
+#define __COMMON_H__
+
+/* Blink pattern
+ * - 25 ms : streaming data
+ * - 250 ms : device not mounted
+ * - 1000 ms : device mounted
+ * - 2500 ms : device is suspended
+ */
+enum
+{
+ BLINK_STREAMING = 25,
+ BLINK_NOT_MOUNTED = 250,
+ BLINK_MOUNTED = 1000,
+ BLINK_SUSPENDED = 2500,
+};
+
+enum
+{
+ VOLUME_CTRL_0_DB = 0,
+ VOLUME_CTRL_10_DB = 2560,
+ VOLUME_CTRL_20_DB = 5120,
+ VOLUME_CTRL_30_DB = 7680,
+ VOLUME_CTRL_40_DB = 10240,
+ VOLUME_CTRL_50_DB = 12800,
+ VOLUME_CTRL_60_DB = 15360,
+ VOLUME_CTRL_70_DB = 17920,
+ VOLUME_CTRL_80_DB = 20480,
+ VOLUME_CTRL_90_DB = 23040,
+ VOLUME_CTRL_100_DB = 25600,
+ VOLUME_CTRL_SILENCE = 0x8000,
+};
+
+#endif