forked from PAWPAW-Mirror/lib_xua
added xua_api.h for extern declaration of get/set_usb_to/from_device_rate/res APIs and removed from c/xc files
This commit is contained in:
18
lib_xua/api/xua_api.h
Normal file
18
lib_xua/api/xua_api.h
Normal file
@@ -0,0 +1,18 @@
|
||||
// Copyright (c) 2017-2020, XMOS Ltd, All rights reserved
|
||||
|
||||
#ifndef __XUA_API_H__
|
||||
#define __XUA_API_H__
|
||||
|
||||
#if __XC__
|
||||
extern void set_usb_to_device_rate(uint32_t rate);
|
||||
extern void set_device_to_usb_rate(uint32_t rate);
|
||||
extern void set_usb_to_device_bit_res(uint32_t rate);
|
||||
extern void set_device_to_usb_bit_res(uint32_t rate);
|
||||
#endif
|
||||
|
||||
extern uint32_t get_usb_to_device_rate();
|
||||
extern uint32_t get_device_to_usb_rate();
|
||||
extern uint32_t get_usb_to_device_bit_res();
|
||||
extern uint32_t get_device_to_usb_bit_res();
|
||||
|
||||
#endif //__XUA_API_H__
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "interrupt.h"
|
||||
#include "xua_commands.h"
|
||||
#include "xud.h"
|
||||
#include "xua_api.h"
|
||||
|
||||
#ifdef NATIVE_DSD
|
||||
#include "usbaudio20.h" /* Defines from the USB Audio 2.0 Specifications */
|
||||
@@ -17,12 +18,6 @@
|
||||
#endif
|
||||
#define MAX(x,y) ((x)>(y) ? (x) : (y))
|
||||
|
||||
#if(defined XUA_USB_DESCRIPTOR_OVERWRITE_RATE_RES)
|
||||
extern uint32_t get_usb_to_device_rate();
|
||||
extern uint32_t get_device_to_usb_rate();
|
||||
extern uint32_t get_usb_to_device_bit_res();
|
||||
extern uint32_t get_device_to_usb_bit_res();
|
||||
#endif
|
||||
|
||||
/* TODO use SLOTSIZE to potentially save memory */
|
||||
/* Note we could improve on this, for one subslot is set to 4 */
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
#include "dsd_support.h"
|
||||
#endif
|
||||
|
||||
#include "xua_api.h"
|
||||
|
||||
#ifndef __XC__
|
||||
/* Support for xCORE channels in C */
|
||||
#define null 0
|
||||
@@ -65,13 +67,6 @@ extern void device_reboot(void);
|
||||
#include "xua_hid.h"
|
||||
#endif
|
||||
|
||||
#if(defined XUA_USB_DESCRIPTOR_OVERWRITE_RATE_RES)
|
||||
extern uint32_t get_usb_to_device_rate();
|
||||
extern uint32_t get_device_to_usb_rate();
|
||||
extern uint32_t get_usb_to_device_bit_res();
|
||||
extern uint32_t get_device_to_usb_bit_res();
|
||||
#endif
|
||||
|
||||
unsigned int DFU_mode_active = 0; // 0 - App active, 1 - DFU active
|
||||
|
||||
/* Global volume and mute tables */
|
||||
|
||||
Reference in New Issue
Block a user