Files
base/middleware/usb/uC-USBD/Class/Audio/usbd_audio_os.h
2025-11-07 09:57:14 +08:00

158 lines
7.4 KiB
C

/*
*********************************************************************************************************
* uC/USB-Device
* The Embedded USB Device Stack
*
* Copyright 2004-2021 Silicon Laboratories Inc. www.silabs.com
*
* SPDX-License-Identifier: APACHE-2.0
*
* This software is subject to an open source license and is distributed by
* Silicon Laboratories Inc. pursuant to the terms of the Apache License,
* Version 2.0 available at www.apache.org/licenses/LICENSE-2.0.
*
*********************************************************************************************************
*/
/*
*********************************************************************************************************
*
* USB DEVICE AUDIO CLASS
*
* Filename : usbd_audio_os.h
* Version : V4.06.01
*********************************************************************************************************
*/
/*
*********************************************************************************************************
*********************************************************************************************************
* MODULE
*********************************************************************************************************
*********************************************************************************************************
*/
#ifndef USBD_AUDIO_OS_MODULE_PRESENT
#define USBD_AUDIO_OS_MODULE_PRESENT
/*
*********************************************************************************************************
*********************************************************************************************************
* INCLUDE FILES
*********************************************************************************************************
*********************************************************************************************************
*/
/*
*********************************************************************************************************
*********************************************************************************************************
* EXTERNS
*********************************************************************************************************
*********************************************************************************************************
*/
/*
*********************************************************************************************************
*********************************************************************************************************
* DEFINES
*********************************************************************************************************
*********************************************************************************************************
*/
/*
*********************************************************************************************************
*********************************************************************************************************
* DATA TYPES
*********************************************************************************************************
*********************************************************************************************************
*/
/*
*********************************************************************************************************
*********************************************************************************************************
* GLOBAL VARIABLES
*********************************************************************************************************
*********************************************************************************************************
*/
/*
*********************************************************************************************************
*********************************************************************************************************
* MACRO'S
*********************************************************************************************************
*********************************************************************************************************
*/
/*
*********************************************************************************************************
*********************************************************************************************************
* FUNCTION PROTOTYPES
*********************************************************************************************************
*********************************************************************************************************
*/
void USBD_Audio_OS_Init (CPU_INT16U msg_qty,
USBD_ERR *p_err);
void USBD_Audio_OS_AS_IF_LockCreate (CPU_INT08U as_if_nbr,
USBD_ERR *p_err);
void USBD_Audio_OS_AS_IF_LockAcquire (CPU_INT08U as_if_nbr,
CPU_INT16U timeout_ms,
USBD_ERR *p_err);
void USBD_Audio_OS_AS_IF_LockRelease (CPU_INT08U as_if_nbr);
void USBD_Audio_OS_RingBufQLockCreate (CPU_INT08U as_if_settings_ix,
USBD_ERR *p_err);
void USBD_Audio_OS_RingBufQLockAcquire(CPU_INT08U as_if_settings_ix,
CPU_INT16U timeout_ms,
USBD_ERR *p_err);
void USBD_Audio_OS_RingBufQLockRelease(CPU_INT08U as_if_settings_ix);
#if (USBD_AUDIO_CFG_RECORD_EN == DEF_ENABLED)
void USBD_Audio_OS_RecordReqPost (void *p_msg,
USBD_ERR *p_err);
void *USBD_Audio_OS_RecordReqPend (USBD_ERR *p_err);
#endif
#if (USBD_AUDIO_CFG_PLAYBACK_EN == DEF_ENABLED)
void USBD_Audio_OS_PlaybackReqPost (void *p_msg,
USBD_ERR *p_err);
void *USBD_Audio_OS_PlaybackReqPend (USBD_ERR *p_err);
#endif
void USBD_Audio_OS_DlyMs (CPU_INT32U ms);
/*
*********************************************************************************************************
*********************************************************************************************************
* CONFIGURATION ERRORS
*********************************************************************************************************
*********************************************************************************************************
*/
/*
*********************************************************************************************************
*********************************************************************************************************
* MODULE END
*********************************************************************************************************
*********************************************************************************************************
*/
#endif