diff options
author | Thomas Martitz <kugel@rockbox.org> | 2009-01-27 11:05:38 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2009-01-27 11:05:38 +0000 |
commit | a43b0db3d10aeb04e78494074f90b553b1a8ae59 (patch) | |
tree | 5c9e5850a3516496308ca248f4640e0bbd0b32cc /firmware/target/arm/as3525/sansa-fuze | |
parent | 9d10f112994ddd3470e219175b92ab201769ba87 (diff) | |
download | rockbox-a43b0db3d10aeb04e78494074f90b553b1a8ae59.tar.gz rockbox-a43b0db3d10aeb04e78494074f90b553b1a8ae59.zip |
Sansa AMS: Debug screen, shows GPIO and (on the fuze) DBOP input for now, to be extended
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19866 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/as3525/sansa-fuze')
-rw-r--r-- | firmware/target/arm/as3525/sansa-fuze/button-fuze.c | 12 | ||||
-rw-r--r-- | firmware/target/arm/as3525/sansa-fuze/debug-target.h | 28 |
2 files changed, 34 insertions, 6 deletions
diff --git a/firmware/target/arm/as3525/sansa-fuze/button-fuze.c b/firmware/target/arm/as3525/sansa-fuze/button-fuze.c index ff07965f90..e52a1d37d8 100644 --- a/firmware/target/arm/as3525/sansa-fuze/button-fuze.c +++ b/firmware/target/arm/as3525/sansa-fuze/button-fuze.c | |||
@@ -42,8 +42,8 @@ static bool hold_button_old = false; | |||
42 | #else | 42 | #else |
43 | #define hold_button false | 43 | #define hold_button false |
44 | #endif /* !BOOTLOADER */ | 44 | #endif /* !BOOTLOADER */ |
45 | static int int_btn = BUTTON_NONE; | 45 | static int int_btn = BUTTON_NONE; |
46 | static short dbop_din = BUTTON_NONE; | 46 | short _dbop_din = BUTTON_NONE; |
47 | 47 | ||
48 | void button_init_device(void) | 48 | void button_init_device(void) |
49 | { | 49 | { |
@@ -76,7 +76,7 @@ static void get_wheel(void) | |||
76 | { 2, 0, 3, 1 }, /* Clockwise rotation */ | 76 | { 2, 0, 3, 1 }, /* Clockwise rotation */ |
77 | { 1, 3, 0, 2 }, /* Counter-clockwise */ | 77 | { 1, 3, 0, 2 }, /* Counter-clockwise */ |
78 | }; | 78 | }; |
79 | wheel_value = dbop_din & (1<<13|1<<14); | 79 | wheel_value = _dbop_din & (1<<13|1<<14); |
80 | wheel_value >>= 13; | 80 | wheel_value >>= 13; |
81 | /* did the wheel value change? */ | 81 | /* did the wheel value change? */ |
82 | if (!hold_button) | 82 | if (!hold_button) |
@@ -130,7 +130,7 @@ static void get_wheel(void) | |||
130 | /* get hold button state */ | 130 | /* get hold button state */ |
131 | static void get_hold(void) | 131 | static void get_hold(void) |
132 | { | 132 | { |
133 | hold_button = dbop_din & (1<<12); | 133 | hold_button = _dbop_din & (1<<12); |
134 | } | 134 | } |
135 | #endif | 135 | #endif |
136 | 136 | ||
@@ -141,7 +141,7 @@ bool button_hold(void) | |||
141 | 141 | ||
142 | static void get_power(void) | 142 | static void get_power(void) |
143 | { | 143 | { |
144 | if (dbop_din & (1<<8)) | 144 | if (_dbop_din & (1<<8)) |
145 | int_btn |= BUTTON_POWER; | 145 | int_btn |= BUTTON_POWER; |
146 | } | 146 | } |
147 | 147 | ||
@@ -172,7 +172,7 @@ static void get_button_from_dbob(void) | |||
172 | temp = DBOP_STAT; | 172 | temp = DBOP_STAT; |
173 | } while ((temp & (1<<16)) == 0); /* wait for valid data */ | 173 | } while ((temp & (1<<16)) == 0); /* wait for valid data */ |
174 | 174 | ||
175 | dbop_din = DBOP_DIN; /* now read */ | 175 | _dbop_din = DBOP_DIN; /* now read */ |
176 | 176 | ||
177 | DBOP_TIMPOL_01 = 0x6e167; | 177 | DBOP_TIMPOL_01 = 0x6e167; |
178 | DBOP_TIMPOL_23 = 0xa167e06f; | 178 | DBOP_TIMPOL_23 = 0xa167e06f; |
diff --git a/firmware/target/arm/as3525/sansa-fuze/debug-target.h b/firmware/target/arm/as3525/sansa-fuze/debug-target.h new file mode 100644 index 0000000000..7ba5b2e4db --- /dev/null +++ b/firmware/target/arm/as3525/sansa-fuze/debug-target.h | |||
@@ -0,0 +1,28 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2007 by Karl Kurbjun | ||
11 | * | ||
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. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | |||
22 | #include <stdbool.h> | ||
23 | |||
24 | #define DEBUG_CANCEL BUTTON_LEFT | ||
25 | #define TRACK_DBOP_DIN | ||
26 | extern short _dbop_din; | ||
27 | bool __dbg_hw_info(void); | ||
28 | bool __dbg_ports(void); | ||