From ba78bd9ba834260d035a9830726afc34fdad2a15 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Sun, 18 Oct 2009 23:32:54 +0200 Subject: import firmware from LEGO v1.05 --- AT91SAM7S256/Source/c_button.iom | 61 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 AT91SAM7S256/Source/c_button.iom (limited to 'AT91SAM7S256/Source/c_button.iom') diff --git a/AT91SAM7S256/Source/c_button.iom b/AT91SAM7S256/Source/c_button.iom new file mode 100644 index 0000000..24064a2 --- /dev/null +++ b/AT91SAM7S256/Source/c_button.iom @@ -0,0 +1,61 @@ +// +// Date init 14.12.2004 +// +// Revision date $Date:: 16-05-06 9:58 $ +// +// Filename $Workfile:: c_button.iom $ +// +// Version $Revision:: 10 $ +// +// Archive $Archive:: /LMS2006/Sys01/Main/Firmware/Source/c_button.i $ +// +// 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 + + + -- cgit v1.2.3