Sonochan II 0.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
host_audio_task.h
Go to the documentation of this file.
1 /* This header file is part of the ATMEL AVR32-SoftwareFramework-AT32UC3-1.5.0 Release */
2
3 /*This file is prepared for Doxygen automatic documentation generation.*/
19 /* Copyright (c) 2009 Atmel Corporation. All rights reserved.
20 *
21 * Redistribution and use in source and binary forms, with or without
22 * modification, are permitted provided that the following conditions are met:
23 *
24 * 1. Redistributions of source code must retain the above copyright notice, this
25 * list of conditions and the following disclaimer.
26 *
27 * 2. Redistributions in binary form must reproduce the above copyright notice,
28 * this list of conditions and the following disclaimer in the documentation
29 * and/or other materials provided with the distribution.
30 *
31 * 3. The name of Atmel may not be used to endorse or promote products derived
32 * from this software without specific prior written permission.
33 *
34 * 4. This software may only be redistributed and used in connection with an Atmel
35 * AVR product.
36 *
37 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
38 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
39 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
40 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
41 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
42 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
43 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
44 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
45 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
46 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
47 *
48 */
49
50 #ifndef _HOST_AUDIO_TASK_H_
51 #define _HOST_AUDIO_TASK_H_
52
53
54 //_____ I N C L U D E S ____________________________________________________
55
56 #include "conf_usb.h"
57
58 #if USB_HOST_FEATURE == DISABLED
59 #error host_audio_task.h is #included although USB_HOST_FEATURE is disabled
60 #endif
61
62
63 #include "usb_host_task.h"
64
65
66 //_____ M A C R O S ________________________________________________________
67
68 #define Is_host_audio_configured() (audio_connected && !Is_host_suspended())
69
70
71 //_____ D E F I N I T I O N S ______________________________________________
72
73 #define MUTE_ON TRUE
74 #define MUTE_OFF FALSE
75
77 #define MAX_BMA_CONTROLS 4
78
79 typedef struct
80 {
81 U8 unit;
82 U8 n_bmaControls;
83 U8 bmaControls[MAX_BMA_CONTROLS];
84 } cs_feature_unit_t;
85
86 //_____ D E C L A R A T I O N S ____________________________________________
87
88 extern volatile Bool ms_connected;
89
90 extern void host_audio_set_cur_mute(U16 unit, Bool cs_mute);
91 extern U16 host_audio_get_max( U16 unit, U16 channel_number);
92 extern void host_audio_set_cur( U16 unit, U16 channel_number, U16 volume);
93 extern void host_set_sampling_rate( U16 endpoint, U32 sampling_rate);
94 extern void host_audio_task_init(void);
95 #ifdef FREERTOS_USED
96 extern void host_audio_task(void *pvParameters);
97 #else
98 extern void host_audio_task(void);
99 #endif
100
101
102 #endif // _HOST_AUDIO_TASK_H_