summaryrefslogtreecommitdiffstats
path: root/apps/usb_keymaps.c
diff options
context:
space:
mode:
authorTomer Shalev <shalev.tomer@gmail.com>2009-10-25 20:27:38 +0000
committerTomer Shalev <shalev.tomer@gmail.com>2009-10-25 20:27:38 +0000
commit4806458dc207d96a37c020325009456c7ee875a3 (patch)
treec7af123e921371e85e35570c5437240048f2054c /apps/usb_keymaps.c
parentec43287aa08f7842b93d786c1ef5e019ac1e4ea1 (diff)
downloadrockbox-4806458dc207d96a37c020325009456c7ee875a3.tar.gz
rockbox-4806458dc207d96a37c020325009456c7ee875a3.tar.bz2
rockbox-4806458dc207d96a37c020325009456c7ee875a3.zip
Use ARRAYLEN macro in usb_keymaps.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23351 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/usb_keymaps.c')
-rw-r--r--apps/usb_keymaps.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/apps/usb_keymaps.c b/apps/usb_keymaps.c
index f04fa54c3d..ecb40794da 100644
--- a/apps/usb_keymaps.c
+++ b/apps/usb_keymaps.c
@@ -34,9 +34,6 @@
#define CTRL(key) MODIFIER(HID_KEYBOARD_LEFT_CONTROL, key)
#define SHIFT(key) MODIFIER(HID_KEYBOARD_LEFT_SHIFT, key)
-#define NUM_KEY_MAPPINGS (sizeof(hid_key_mappings) / \
- sizeof(hid_key_mappings[0]))
-
typedef struct
{
int action;
@@ -187,7 +184,7 @@ int get_hid_usb_action(void)
case ACTION_USB_HID_MODE_SWITCH_PREV:
/* Switch key mappings in a cyclic way */
usb_keypad_mode = clamp_value_wrap(usb_keypad_mode + step,
- NUM_KEY_MAPPINGS - 1, 0);
+ ARRAYLEN(hid_key_mappings) - 1, 0);
break;
default:
{