source: trunk/platform/a640/kbd.c @ 515

Revision 515, 842 bytes checked in by reyalp, 5 years ago (diff)

set svn:eol-style and fix files that had mixed line endings. See http://chdk.setepontos.com/index.php/topic,2145.15.html

  • Property svn:eol-style set to native
Line 
1#include "../generic/kbd.c"
2
3static KeyMap keymap[] = {
4    /* tiny bug: key order matters. see kbd_get_pressed_key()
5     * for example
6     */
7        { KEY_UP        , 0x00000001 },
8        { KEY_DOWN      , 0x00000002 },
9        { KEY_LEFT      , 0x00000008 },
10        { KEY_RIGHT     , 0x00000004 },
11        { KEY_SET       , 0x00000100 },
12        { KEY_SHOOT_FULL, 0x00000030 }, // note 3 here!
13        { KEY_SHOOT_HALF, 0x00000010 },
14        { KEY_ZOOM_IN   , 0x00000040 },
15        { KEY_ZOOM_OUT  , 0x00000080 },
16        { KEY_MENU      , 0x00000200 },
17        { KEY_DISPLAY   , 0x00000400 },
18        { KEY_PRINT     , 0x00001000 },
19        { KEY_ERASE     , 0x00000800 },
20        { KEY_DUMMY     , 0x00001000 },
21        { 0, 0 }
22};
23
24void kbd_fetch_data(long *dst)
25{
26    volatile long *mmio0 = (void*)0xc0220200;
27    volatile long *mmio1 = (void*)0xc0220204;
28    volatile long *mmio2 = (void*)0xc0220208;
29
30    dst[0] = *mmio0;
31    dst[1] = *mmio1;
32    dst[2] = *mmio2 & 0xffff;
33}
34
Note: See TracBrowser for help on using the repository browser.