Custom Defines - XMOS xCORE-200 Multi-channel Audio board Design Manual

Usb audio
Hide thumbs Also See for xCORE-200 Multi-channel Audio board:
Table of Contents

Advertisement

USB Audio Design Guide
5.6.1 Custom Defines
The customdefines.h file contains all the #defines required to tailor the USB audio
framework to the particular application at hand. Typically these over-ride default
values in devicedefines.h in module_usb_audio.
First there are defines to determine overall capability. For this appliction S/PDIF
output and DFU are enabled. Note that ifndef is used to check that the option is
not already defined in the makefile.
/* Enable / Disable MIDI - Default is MIDI off */
# ifndef MIDI
# define MIDI
# endif
/* Enable / Disable SPDIF - Default is SPDIF on */
# ifndef SPDIF_TX
# define SPDIF_TX
# endif
Next, the file defines the audio properties of the application. This application has
stereo in and stereo out with an S/PDIF output that duplicates analogue channels 1
and 2 (note channels are indexed from 0):
/* Number of USB streaming channels - Default is 2 in 2 out */
# ifndef NU M_ U SB _C H AN _I N
# define NU M_ U SB _C H AN _I N
# endif
# ifndef N U M _ U S B _ C H A N _ O UT
# define N U M _ U S B _ C H A N _ O UT
# endif
/* Number of IS2 chans to DAC ..*/
# ifndef I2S_CHANS_DAC
# define I2S_CHANS_DAC
# endif
/* Number of I2S chans from ADC */
# ifndef I2S_CHANS_ADC
# define I2S_CHANS_ADC
# endif
/* Index of SPDIF TX channel ( duplicated DAC channels 1/2) */
# define SPD IF_TX_ INDEX
The file then sets some defines for the master clocks on the hardware and the
maximum sample-rate for the device.
XM0088546.1
(0)
(1)
(2)
/* Device to Host */
(2)
/* Host to Device */
(2)
(2)
(0)
54/110

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents