Landtiger LPC1768 C BigLib
1
A self made, custom C library for the LandTiger board.
Loading...
Searching...
No Matches
button_types.h
Go to the documentation of this file.
1
#ifndef __BUTTONS_TYPES_H
2
#define __BUTTONS_TYPES_H
3
4
typedef
enum
5
{
6
BTN_DEBOUNCE_WITH_RIT
= 0x1
7
}
BUTTON_Config
;
8
9
typedef
enum
10
{
12
BTN_ERR_OK
= 0,
15
BTN_ERR_RIT_UNINIT
,
16
20
BTN_ERR_INT_PRIO_INVALID
,
21
24
BTN_ERR_NO_HANDLER_TO_ENABLE
,
25
}
BUTTON_Error
;
26
27
// INTERRUPTS
28
29
typedef
enum
30
{
32
BTN_SRC_EINT0
= 0,
33
35
BTN_SRC_EINT1
,
36
38
BTN_SRC_EINT2
,
39
40
BTN_SRC_COUNT
41
}
BUTTON_Source
;
42
43
// Interrupt handler function pointer
44
typedef
void (*
BUTTON_Function
)(void);
45
46
#endif
BUTTON_Source
BUTTON_Source
Definition
button_types.h:30
BTN_SRC_EINT1
@ BTN_SRC_EINT1
EINT1: First button from the left.
Definition
button_types.h:35
BTN_SRC_EINT0
@ BTN_SRC_EINT0
INT0: Third button from the left (next to RES)
Definition
button_types.h:32
BTN_SRC_EINT2
@ BTN_SRC_EINT2
EINT2: Second button from the left.
Definition
button_types.h:38
BTN_SRC_COUNT
@ BTN_SRC_COUNT
Definition
button_types.h:40
BUTTON_Function
void(* BUTTON_Function)(void)
Definition
button_types.h:44
BUTTON_Config
BUTTON_Config
Definition
button_types.h:5
BTN_DEBOUNCE_WITH_RIT
@ BTN_DEBOUNCE_WITH_RIT
Definition
button_types.h:6
BUTTON_Error
BUTTON_Error
Definition
button_types.h:10
BTN_ERR_INT_PRIO_INVALID
@ BTN_ERR_INT_PRIO_INVALID
An invalid priority was specified (must be 0 <= prio <= 15). This is not necessarily an error,...
Definition
button_types.h:20
BTN_ERR_RIT_UNINIT
@ BTN_ERR_RIT_UNINIT
During initialization, DEBOUNCE_WITH_RIT was requested but the RIT was not enabled.
Definition
button_types.h:15
BTN_ERR_NO_HANDLER_TO_ENABLE
@ BTN_ERR_NO_HANDLER_TO_ENABLE
It was requested to enable a button interrupt, but no function was bound to it.
Definition
button_types.h:24
BTN_ERR_OK
@ BTN_ERR_OK
No error.
Definition
button_types.h:12
Keil
Include
Peripherals
button_types.h
Generated by
1.9.8