summaryrefslogtreecommitdiff
path: root/AT91SAM7S256/Source/c_button.iom
blob: 640a7cd63f3447dd46b5fd1e97e4d19a69ecb444 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//
// Date init       14.12.2004
//
// Revision date   $Date:: 14-11-07 12:40                                    $
//
// Filename        $Workfile:: c_button.iom                                  $
//
// Version         $Revision:: 1                                             $
//
// Archive         $Archive:: /LMS2006/Sys01/Main_V02/Firmware/Source/c_butt $
//
// Platform        C
//

#ifndef   CBUTTON_IOM
#define   CBUTTON_IOM

#define   pMapButton         ((IOMAPBUTTON*)(pHeaders[ENTRY_BUTTON]->pIOMap))  

enum
{
  BTN1,
  BTN2,
  BTN3,
  BTN4,
  NO_OF_BTNS  
};

/* Costants related to State */
enum
{
  PRESSED_EV         = 0x01,
  SHORT_RELEASED_EV  = 0x02,
  LONG_PRESSED_EV    = 0x04,
  LONG_RELEASED_EV   = 0x08,
  PRESSED_STATE      = 0x80
};

typedef   struct
{
  UBYTE   PressedCnt;
  UBYTE   LongPressCnt;
  UBYTE   ShortRelCnt;
  UBYTE   LongRelCnt;
  UBYTE   RelCnt;
  UBYTE   SpareOne;
  UBYTE   SpareTwo;
  UBYTE   SpareThree;
}BTNCNT;

typedef   struct
{
  BTNCNT  BtnCnt[NO_OF_BTNS];
  UBYTE   State[NO_OF_BTNS];
}IOMAPBUTTON;


#endif