Landtiger LPC1768 C BigLib
1
A self made, custom C library for the LandTiger board.
Loading...
Searching...
No Matches
joystick_types.h
Go to the documentation of this file.
1
#ifndef __JOYSTICK_TYPES_H
2
#define __JOYSTICK_TYPES_H
3
4
#include "
types.h
"
5
6
typedef
enum
7
{
9
JOY_ERR_OK
= 0,
12
JOY_ERR_RIT_UNINIT
,
13
}
JOYSTICK_Error
;
14
16
typedef
void (*
JOYSTICK_Function
)(void);
17
18
// Each function is mapped to the correspoding GPIO pin, so
19
// check can be simplified.
20
typedef
enum
21
{
22
JOY_ACTION_SEL
= 0,
// GPIO 1.25
23
JOY_ACTION_DOWN
,
24
JOY_ACTION_LEFT
,
25
JOY_ACTION_RIGHT
,
26
JOY_ACTION_UP
,
// GPIO 1.29
27
JOY_ACTION_COUNT
28
}
JOYSTICK_Action
;
29
30
#define JOY_ACTION_ALL (u8)(-1)
31
32
#endif
JOYSTICK_Function
void(* JOYSTICK_Function)(void)
Joystick function handler function pointer.
Definition
joystick_types.h:16
JOYSTICK_Error
JOYSTICK_Error
Definition
joystick_types.h:7
JOY_ERR_OK
@ JOY_ERR_OK
No error.
Definition
joystick_types.h:9
JOY_ERR_RIT_UNINIT
@ JOY_ERR_RIT_UNINIT
During initialization, POLL_WITH_RIT was requested but the RIT was not enabled.
Definition
joystick_types.h:12
JOYSTICK_Action
JOYSTICK_Action
Definition
joystick_types.h:21
JOY_ACTION_SEL
@ JOY_ACTION_SEL
Definition
joystick_types.h:22
JOY_ACTION_COUNT
@ JOY_ACTION_COUNT
Definition
joystick_types.h:27
JOY_ACTION_RIGHT
@ JOY_ACTION_RIGHT
Definition
joystick_types.h:25
JOY_ACTION_LEFT
@ JOY_ACTION_LEFT
Definition
joystick_types.h:24
JOY_ACTION_UP
@ JOY_ACTION_UP
Definition
joystick_types.h:26
JOY_ACTION_DOWN
@ JOY_ACTION_DOWN
Definition
joystick_types.h:23
types.h
Keil
Include
Peripherals
joystick_types.h
Generated by
1.9.8