nuttx/audio: Add AUDIO_CHANNELS_RANGE macro

Signed-off-by: renjianguang <renjianguang@xiaomi.com>
This commit is contained in:
renjianguang 2023-08-18 18:51:16 +08:00 committed by Xiang Xiao
parent bcfb4decb0
commit 86ae87b1ec

View File

@ -355,6 +355,10 @@
#define AUDIO_APB_DEQUEUED (1 << 2)
#define AUDIO_APB_FINAL (1 << 3) /* Last buffer in the stream */
/* Audio channels range wrapper macro */
#define AUDIO_CHANNELS_RANGE(min, max) ((uint8_t)(((min) << 4) | ((max) & 0xf)))
/****************************************************************************
* Public Types
****************************************************************************/