PDL for FM4
Version1.2
Peripheral Driverl Library for FM4
Main Page
Modules
Data Structures
Files
File List
Globals
UsbDeviceHidJoystick.h
Go to the documentation of this file.
1
/*******************************************************************************
2
* Copyright (C) 2013 Spansion LLC. All Rights Reserved.
3
*
4
* This software is owned and published by:
5
* Spansion LLC, 915 DeGuigne Dr. Sunnyvale, CA 94088-3453 ("Spansion").
6
*
7
* BY DOWNLOADING, INSTALLING OR USING THIS SOFTWARE, YOU AGREE TO BE BOUND
8
* BY ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT.
9
*
10
* This software contains source code for use with Spansion
11
* components. This software is licensed by Spansion to be adapted only
12
* for use in systems utilizing Spansion components. Spansion shall not be
13
* responsible for misuse or illegal use of this software for devices not
14
* supported herein. Spansion is providing this software "AS IS" and will
15
* not be responsible for issues arising from incorrect user implementation
16
* of the software.
17
*
18
* SPANSION MAKES NO WARRANTY, EXPRESS OR IMPLIED, ARISING BY LAW OR OTHERWISE,
19
* REGARDING THE SOFTWARE (INCLUDING ANY ACOOMPANYING WRITTEN MATERIALS),
20
* ITS PERFORMANCE OR SUITABILITY FOR YOUR INTENDED USE, INCLUDING,
21
* WITHOUT LIMITATION, THE IMPLIED WARRANTY OF MERCHANTABILITY, THE IMPLIED
22
* WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE OR USE, AND THE IMPLIED
23
* WARRANTY OF NONINFRINGEMENT.
24
* SPANSION SHALL HAVE NO LIABILITY (WHETHER IN CONTRACT, WARRANTY, TORT,
25
* NEGLIGENCE OR OTHERWISE) FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT
26
* LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION,
27
* LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS) ARISING FROM USE OR
28
* INABILITY TO USE THE SOFTWARE, INCLUDING, WITHOUT LIMITATION, ANY DIRECT,
29
* INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOSS OF DATA,
30
* SAVINGS OR PROFITS,
31
* EVEN IF SPANSION HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
32
* YOU ASSUME ALL RESPONSIBILITIES FOR SELECTION OF THE SOFTWARE TO ACHIEVE YOUR
33
* INTENDED RESULTS, AND FOR THE INSTALLATION OF, USE OF, AND RESULTS OBTAINED
34
* FROM, THE SOFTWARE.
35
*
36
* This software may be replicated in part or whole for the licensed use,
37
* with the restriction that this Disclaimer and Copyright notice must be
38
* included with each copy of this software, whether used in part or whole,
39
* at all times.
40
*/
41
/******************************************************************************/
53
#ifndef __USBDEVICEHIDJOYSTICK_H__
54
#define __USBDEVICEHIDJOYSTICK_H__
55
56
/*****************************************************************************/
57
/* Include files */
58
/*****************************************************************************/
59
60
#include "
usb.h
"
61
62
#ifndef USBDEVICEHIDJOYSTICK_ENABLED
63
#define USBDEVICEHIDJOYSTICK_ENABLED OFF
64
#endif
65
66
#if ((FM_PERIPHERAL_USB_DEVICE_ENABLED == ON) && (USBDEVICEHIDJOYSTICK_ENABLED == ON))
67
68
#include "
usbdevice.h
"
69
70
/* C binding of definitions if building with C++ compiler */
71
#ifdef __cplusplus
72
extern
"C"
73
{
74
#endif
75
102
103
/*****************************************************************************/
104
/* Global pre-processor symbols/macros ('#define') */
105
/*****************************************************************************/
106
107
108
109
110
111
112
113
/*****************************************************************************/
114
/* Global type definitions ('typedef') */
115
/*****************************************************************************/
116
117
118
119
/*****************************************************************************/
120
/* Global variable declarations ('extern', definition in C source) */
121
/*****************************************************************************/
122
123
124
125
/*****************************************************************************/
126
/* Global function prototypes ('extern', definition in C source) */
127
/*****************************************************************************/
128
129
void
UsbDeviceHidJoystick_Init
(stc_usbn_t* pstcUsb);
130
131
132
139
void
UsbDeviceHidJoystick_ChangeThrottle
(int8_t iThrottle);
140
141
148
void
UsbDeviceHidJoystick_ChangeX
(int8_t iX);
149
150
157
void
UsbDeviceHidJoystick_ChangeY
(int8_t iY);
158
159
169
void
UsbDeviceHidJoystick_ChangeXY
(int8_t iX, int8_t iY);
170
171
178
void
UsbDeviceHidJoystick_ChangeButton1
(
boolean_t
bButtonValue);
179
180
187
void
UsbDeviceHidJoystick_ChangeButton2
(
boolean_t
bButtonValue);
188
189
196
void
UsbDeviceHidJoystick_ChangeButton3
(
boolean_t
bButtonValue);
197
198
205
void
UsbDeviceHidJoystick_ChangeButton4
(
boolean_t
bButtonValue);
206
207
213
void
UsbDeviceHidJoystick_ChangeHatUp
(
void
);
214
215
221
void
UsbDeviceHidJoystick_ChangeHatRight
(
void
);
222
223
229
void
UsbDeviceHidJoystick_ChangeHatDown
(
void
);
230
231
237
void
UsbDeviceHidJoystick_ChangeHatLeft
(
void
);
238
239
245
void
UsbDeviceHidJoystick_ChangeHatNoDirection
(
void
);
246
254
boolean_t
UsbDeviceHidJoystick_IsConnected
(
void
);
255
256
#ifdef __cplusplus
257
}
258
#endif
259
261
#else
262
#define UsbDeviceHidJoystick_Init(x) ;
263
#endif
264
#endif
/* __UsbDeviceHidJoystickCLASS_H__*/
PDL_1_2
library
midware
usb
device
UsbDeviceHidJoystick.h
Generated on Wed May 28 2014 09:28:11 for PDL for FM4 by
1.8.3.1