3 Copyright (C) Dean Camera, 2009.
5 dean [at] fourwalledcubicle [dot] com
6 www.fourwalledcubicle.com
10 Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)
12 Permission to use, copy, modify, and distribute this software
13 and its documentation for any purpose and without fee is hereby
14 granted, provided that the above copyright notice appear in all
15 copies and that both that the copyright notice and this
16 permission notice and warranty disclaimer appear in supporting
17 documentation, and that the name of the author not be used in
18 advertising or publicity pertaining to distribution of the
19 software without specific, written prior permission.
21 The author disclaim all warranties with regard to this
22 software, including all implied warranties of merchantability
23 and fitness. In no event shall the author be liable for any
24 special, indirect or consequential damages or any damages
25 whatsoever resulting from loss of use, data or profits, whether
26 in an action of contract, negligence or other tortious action,
27 arising out of or in connection with the use or performance of
31 #ifndef _AUDIO_CLASS_H_
32 #define _AUDIO_CLASS_H_
35 #include "../../USB.h"
46 uint8_t InterfaceNumber
;
48 uint8_t DataINEndpointNumber
;
49 uint16_t DataINEndpointSize
;
51 uint8_t DataOUTEndpointNumber
;
52 uint16_t DataOUTEndpointSize
;
54 bool InterfaceEnabled
;
55 } USB_ClassInfo_Audio_t
;
57 /* Function Prototypes: */
58 bool USB_Audio_ConfigureEndpoints(USB_ClassInfo_Audio_t
* AudioInterfaceInfo
);
59 void USB_Audio_ProcessControlPacket(USB_ClassInfo_Audio_t
* AudioInterfaceInfo
);
60 void USB_Audio_USBTask(USB_ClassInfo_Audio_t
* AudioInterfaceInfo
);
62 int8_t USB_Audio_ReadSample8(void);
63 int16_t USB_Audio_ReadSample16(void);
64 int32_t USB_Audio_ReadSample24(void);
65 void USB_Audio_WriteSample8(int8_t Sample
);
66 void USB_Audio_WriteSample16(int16_t Sample
);
67 void USB_Audio_WriteSample24(int32_t Sample
);
68 bool USB_Audio_IsSampleReceived(USB_ClassInfo_Audio_t
* AudioInterfaceInfo
);
69 bool USB_Audio_IsReadyForNextSample(USB_ClassInfo_Audio_t
* AudioInterfaceInfo
);