Resolving build issues due to moving from custom/devicedefines.h to conf headers. Also removed i_audMan

This commit is contained in:
xross
2017-10-31 16:00:29 +00:00
parent e98fffd966
commit 420150f737
32 changed files with 92 additions and 106 deletions

View File

@@ -2,16 +2,14 @@
#ifndef __XUA_H__
#define __XUA_H__
#ifdef __xua_conf_h_exists__
#include "xua_conf.h"
#endif
#include "xua_conf_default.h"
#include "xua_conf_full.h"
#if __XC__ || __STDC__
#include "xua_audiohub.h"
#include "xua_endpoint0.h"
#include "xua_buffer.h"
#endif
#endif

View File

@@ -3,22 +3,12 @@
#if __XC__
#include "xccompat.h"
#ifndef NO_USB
#include "dfu_interface.h"
#endif
typedef interface audManage_if
{
[[guarded]]
void transfer_buffers(int * unsafe in_aud_buf, int * unsafe in_usb_buf,
int * unsafe out_usb_buf, int * unsafe out_aud_buf);
[[guarded]]
void transfer_samples(int in_mic_buf[], int in_spk_buf[], int out_mic_buf[], int out_spk_buf[]);
} audManage_if;
/** The audio driver thread.
*
* This function drives I2S ports and handles samples to/from other digital
@@ -44,7 +34,6 @@ void XUA_AudioHub(chanend ?c_aud
#if (NUM_PDM_MICS > 0)
, chanend c_pdm_in
#endif
, client audManage_if ?i_audMan
);
void SpdifTxWrapper(chanend c_spdif_tx);
@@ -62,11 +51,8 @@ void AudioHwConfig(unsigned samFreq, unsigned mClk, unsigned dsdMode,
#endif // __XC__
void UserBufferManagementInit(CLIENT_INTERFACE(audManage_if, i_audMan));
void UserBufferManagement(unsigned sampsFromUsbToAudio[],
unsigned sampsFromAudioToUsb[],
CLIENT_INTERFACE(audManage_if, i_audMan));
void UserBufferManagementInit();
void UserBufferManagement(unsigned sampsFromUsbToAudio[], unsigned sampsFromAudioToUsb[]);
#endif // __XUA_AUDIOHUB_H__

View File

@@ -1,6 +1,11 @@
#ifndef __XUA_BUFFER_H__
#define __XUA_BUFFER_H__
/** USB Audio Buffering Thread.
#if __XC__
#include "xua.h"
/** USB Audio Buffering Core.
*
* This function buffers USB audio data between the XUD layer and the decouple
* thread. Most of the chanend parameters to the function should be connected to
@@ -17,8 +22,6 @@
* \param c_aud_ctl Audio control channel connected to Endpoint0()
* \param p_off_mclk A port that is clocked of the MCLK input (not the MCLK input itself)
*/
#include "devicedefines.h"
void XUA_Buffer(
chanend c_aud_out,
@@ -112,6 +115,6 @@ void XUA_Buffer_Decouple(chanend c_audio_out
#endif
);
#endif
#endif

View File

@@ -2,9 +2,12 @@
* @brief Defines relating to device configuration and customisation of lib_xua
* @author Ross Owen, XMOS Limited
*/
#ifndef __XUA_CONF_H__
#define __XUA_CONF_H__
#ifndef __XUA_CONF_DEFAULT_H__
#define __XUA_CONF_DEFAULT_H__
#ifdef __xua_conf_h_exists__
#include "xua_conf.h"
#endif
@@ -1163,7 +1166,7 @@
#endif
#ifndef __ASSEMBLER__
/* Endpoint addresses enums */
enum USBEndpointNumber_In
{
@@ -1209,6 +1212,8 @@ enum USBEndpointNumber_Out
ENDPOINT_COUNT_OUT /* End marker */
};
#endif
/*** Internal defines below here. NOT FOR MODIFICATION ***/
#define AUDIO_STOP_FOR_DFU (0x12345678)

View File

@@ -0,0 +1,10 @@
#ifndef __XUA_CONF_FULL_H__
#define __XUA_CONF_FULL_H__
#ifdef __xua_conf_h_exists__
#include "xua_conf.h"
#endif
#include "xua_conf_default.h"
#endif

View File

@@ -2,10 +2,11 @@
#ifndef _XUA_ENDPOINT0_H_
#define _XUA_ENDPOINT0_H_
#include "xua_conf_default.h"
#include "xua.h"
#include "dfu_interface.h"
#include "vendorrequests.h"
#if __XC__
/** Function implementing Endpoint 0 for enumeration, control and configuration
* of USB audio devices. It uses the descriptors defined in ``descriptors_2.h``.
*
@@ -27,3 +28,4 @@ void XUA_Endpoint0(chanend c_ep0_out, chanend c_ep0_in, chanend c_audioCtrl,
VENDOR_REQUESTS_PARAMS_DEC_);
#endif
#endif