USB Audio Design Guide
The
Vendor_ReadHIDButtons()
function simply looks at the value from the ADC,
if is near the maximum value it reports a volume up, near the minimum value a
volume down is reported. If the ADC value is mid-range no event is reported. The
code is shown below:
v o i d V e n d o r _ R e a d H I D B u t t o n s ( u n s i g n e d c h a r h i d D a t a [])
{
u n s i g n e d a d c V a l ;
int d i f f ;
h i d D a t a [0] = 0;
# if d e f i n e d ( A D C _ V O L _ C O N T R O L ) && ( A D C _ V O L _ C O N T R O L == 1)
a d c V a l = g _ a d c V a l > > 20;
if ( a d c V a l < ( A D C _ M I N + T H R E S H ) )
{
/* V o l u m e d o w n */
h i d D a t a [0] = 0 x10 ;
}
e l s e if ( a d c V a l > ( A D C _ M A X - T H R E S H ) )
{
/* V o l u m e up */
h i d D a t a [0] = 0 x08 ;
}
6.2.5
Validated Build Options
The reference design can be built in several ways by changing the build options.
These are described in
usb_audio_sec_custom_defines_api
.
The design has only been fully validated against the build options as set in the
application as distributed. See §
for details and binary naming scheme.
These fully validated build configurations are listed below. In practise, due to the
similarities between the U-Series and L-Series feature set, it is fully expected that
all listed U-Series configurations will operate as expected on the L-Series and vice
versa.
6.2.5.1
Configuration 2ioxs
This configuration runs in high-speed Audio Class 2.0 mode, has the mixer disabled,
supports 2 channels in, 2 channels out, supports sample rates up to 192kHz and
S/PDIF transmit.
6.2.5.2
Configuration 2iomx
This configuration disables S/PDIF and enables MIDI.
XM0088546.1
Содержание xCORE-200 Multi-channel Audio board
Страница 6: ...1 Overview XM0088546 1...