summaryrefslogtreecommitdiff
path: root/firmware/target/arm/tcc77x/logikdax/button-target.h
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2007-10-28 11:08:10 +0000
committerDave Chapman <dave@dchapman.com>2007-10-28 11:08:10 +0000
commit28f6ae49ec1b1d3464add2941eb015bab56f8016 (patch)
tree6d4cddba129663340cf2f30212a516acdd16a4eb /firmware/target/arm/tcc77x/logikdax/button-target.h
parentd3e101bd1184e5c1f474ff0978f65ac7e8e2dbfb (diff)
downloadrockbox-28f6ae49ec1b1d3464add2941eb015bab56f8016.tar.gz
rockbox-28f6ae49ec1b1d3464add2941eb015bab56f8016.zip
Initial work on a port to the Logik DAX 1GB MP3/DAB player. The bootloader build compiles and runs (but only displays some debugging info), and the LCD and ADC drivers are working. Two different bootloader builds are possible: 1) The default build is just a test application for uploading to the device via tcctool; 2) Adding -DTCCBOOT to EXTRA_DEFINES in the build directory Makefile will compile the bootloader so that it can be appended to the end of the original firmware and installed on the device, dual-booting. This commit also includes some work by Hein-Pieter van Braam on a port to the iAudio 7, but that doesn't build yet. A large part of these ports will be generic to all TCC77x devices - see the TelechipsInfo wiki page for some other devices with this CPU. NOTE: Compiling these builds requires an arm-elf-gcc with armv5 support - the current version of rockboxdev.sh compiles such a gcc.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15339 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/tcc77x/logikdax/button-target.h')
-rw-r--r--firmware/target/arm/tcc77x/logikdax/button-target.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/firmware/target/arm/tcc77x/logikdax/button-target.h b/firmware/target/arm/tcc77x/logikdax/button-target.h
new file mode 100644
index 0000000000..2925a423b6
--- /dev/null
+++ b/firmware/target/arm/tcc77x/logikdax/button-target.h
@@ -0,0 +1,70 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2007 by Dave Chapman
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#ifndef _BUTTON_TARGET_H_
21#define _BUTTON_TARGET_H_
22
23#include <stdbool.h>
24#include "config.h"
25
26/*
27
28Results of button testing:
29
30HOLD: GPIOA & 0x0002 (0=pressed, 0x0002 = released)
31POWER: GPIOA & 0x8000 (0=pressed, 0x8000 = released)
32
33ADC[0]: (approx values)
34
35RIGHT - 0x37
36LEFT - 0x7f
37JOYSTICK PRESS - 0xc7
38UP - 0x11e
39DOWN - 0x184
40MODE - 0x1f0/0x1ff
41PRESET - 0x268/0x269
42TIMESHIFT - 0x2dd
43
44Values of ADC[0] tested in OF disassembly: 0x50, 0x96, 0xdc, 0x208, 0x384
45
46*/
47
48
49void button_init_device(void);
50int button_read_device(void);
51
52/* Main unit's buttons */
53#define BUTTON_POWERPLAY 0x00000001
54#define BUTTON_MODE 0x00000002
55#define BUTTON_HOLD 0x00000004
56#define BUTTON_REC 0x00000008
57#define BUTTON_PRESET 0x00000010
58#define BUTTON_LEFT 0x00000020
59#define BUTTON_RIGHT 0x00000040
60#define BUTTON_UP 0x00000080
61#define BUTTON_DOWN 0x00000100
62#define BUTTON_SELECT 0x00000200
63
64#define BUTTON_MAIN (BUTTON_POWERPLAY|BUTTON_MODE|BUTTON_HOLD\
65 |BUTTON_REC|BUTTON_PRESET|BUTTON_LEFT\
66 |BUTTON_RIGHT|BUTTON_UP|BUTTON_DOWN|BUTTON_SELECT)
67
68#define BUTTON_REMOTE 0
69
70#endif /* _BUTTON_TARGET_H_ */