USB Audio Design Guide
/* W r i t e HID R e p o r t D a t a i n t o h i d D a t a a r r a y
*
* B i t s are as f o l l o w s :
* 0: P l a y / P a u s e
* 1: S c a n N e x t T r a c k
* 2: S c a n P r e v T r a c k
* 3: V o l u m e Up
* 4: V o l i m e D o w n
* 5: M u t e
*/
v o i d U s e 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 [])
{
# i f n d e f M I D I
u n s i g n e d a , b ;
p _ b u t _ a : > a ;
p _ b u t _ b : > b ;
a = (~ a ) & 1;
b = (~ b ) & 1;
/* A s s i g n b u t t o n s A and B to Vol Up / D o w n */
h i d D a t a [0] = ( a < < H I D _ C O N T R O L _ V O L U P _ S H I F T ) | ( b < <
>
H I D _ C O N T R O L _ V O L D N _ S H I F T ) ;
# e n d i f
}
In the example above the buttons are assigned to volume up/down.
6.1.4
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.
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.1.4.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 and supports sample rates up to 192kHz
and S/PDIF transmit.
6.1.4.2
Configuration 2iomx
This configuration disables S/PDIF and enables MIDI.
XM0088546.1
Summary of Contents for xCORE-200 Multi-channel Audio board
Page 6: ...1 Overview XM0088546 1...