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
device_generic_hid.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 _DEVICE_GENERIC_HID_H_
51 #define _DEVICE_GENERIC_HID_H_
52
53
54 //================================| Includes |=================================
55 #include <inttypes.h>
56
57 #include "conf_usb.h"
58
59 #if USB_DEVICE_FEATURE == DISABLED
60 #error "device_generic_hid.h is #included although USB_DEVICE_FEATURE\
61 is disabled!"
62 #endif
63
64
65
66 //============================| Uniprot settings |=============================
71 #define DEVICE_GENERIC_HID_SUPPORT_UNIPROT 1
72
73
74 // This settings have meaning only is support is enabled
75 #if DEVICE_GENERIC_HID_SUPPORT_UNIPROT
76
81 #define DEVICE_GENERIC_HID_UNIPROT_PIPE 0
82
84 #define UNI_PIPE0_FRAME_SIZE 8
85
87 #define UNI_PIPE0_FUNC_INIT \
88 device_generic_HID_init(UAC1_EP_HID_RX, UAC1_EP_HID_TX)
89
91 // When RTOS is enabled, then task should not be called
92 #ifdef FREERTOS_USED
93 #define UNI_PIPE0_FUNC_TASK
94 #else
95 #define UNI_PIPE0_FUNC_TASK \
96 device_generic_hid_task()
97 #endif
98 // Universal protocol header file
99 #include "uniprot.h"
100 #endif
101
102 //===========================| Function prototypes |===========================
103
104 extern void device_generic_HID_init(U8 ep_hid_rx, U8 ep_hid_tx);
105 #ifdef FREERTOS_USED
106 extern void device_generic_hid_task(void *pvParameters);
107 #else
108 extern void device_generic_hid_task(void);
109 #endif
110
111
112 #endif // _DEVICE_GENERIC_HID_H_