Dircache: Don't expose struct dircache_entry and pointers into the cache, use IDs...
[kugel-rb.git] / apps / keymaps / keymap-ondavx767.c
blob7dd7435348e84de864f424fdd9496eef0e6fa568
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2009 by Maurus Cuelenaere
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 /* Button Code Definitions for the Onda VX767 target */
23 /* This needs from someone with the actual target! */
25 #include <stdio.h>
26 #include <string.h>
27 #include <stdlib.h>
29 #include "config.h"
30 #include "action.h"
31 #include "button.h"
32 #include "settings.h"
34 /*
35 * The format of the list is as follows
36 * { Action Code, Button code, Prereq button code }
37 * if there's no need to check the previous button's value, use BUTTON_NONE
38 * Insert LAST_ITEM_IN_LIST at the end of each mapping
40 static const struct button_mapping button_context_standard[] = {
42 LAST_ITEM_IN_LIST
43 }; /* button_context_standard */
45 static const struct button_mapping button_context_wps[] = {
47 LAST_ITEM_IN_LIST
48 }; /* button_context_wps */
52 /* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */
53 const struct button_mapping* get_context_mapping(int context)
55 switch (context)
57 case CONTEXT_STD:
58 return button_context_standard;
59 case CONTEXT_WPS:
60 return button_context_wps;
62 case CONTEXT_TREE:
63 case CONTEXT_LIST:
64 case CONTEXT_MAINMENU:
66 case CONTEXT_SETTINGS:
67 case CONTEXT_SETTINGS|CONTEXT_REMOTE:
68 default:
69 return button_context_standard;
71 return button_context_standard;