summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
authorBarry Wardell <rockbox@barrywardell.net>2007-10-16 10:48:16 +0000
committerBarry Wardell <rockbox@barrywardell.net>2007-10-16 10:48:16 +0000
commit1d1a17c0dbd0fdf2857c5d1636713247d28f1762 (patch)
tree863d40550a3f6da5406d65471b3593bde9f9d8d5 /firmware/export
parent8b44601a7c306611b9aba29a7774708585c97539 (diff)
downloadrockbox-1d1a17c0dbd0fdf2857c5d1636713247d28f1762.tar.gz
rockbox-1d1a17c0dbd0fdf2857c5d1636713247d28f1762.zip
Improved H10 ADC driver. We now do things exactly as the OF does. This includes shifting the readings by 0x14 when PLL is enabled. Battery voltages and remote/scrollpad values adjusted accordingly. We also now wait for the ADC to indicate the conversion is complete before reading the data, so hopefully we will get more reliably steady readings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15141 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/pp5020.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/firmware/export/pp5020.h b/firmware/export/pp5020.h
index b591bce695..865b0b2feb 100644
--- a/firmware/export/pp5020.h
+++ b/firmware/export/pp5020.h
@@ -121,8 +121,9 @@
121 121
122/* Device Controller */ 122/* Device Controller */
123#define DEV_RS (*(volatile unsigned long *)(0x60006004)) 123#define DEV_RS (*(volatile unsigned long *)(0x60006004))
124#define DEV_OFF_MASK (*(volatile unsigned long *)(0x60006008)) 124#define DEV_RS2 (*(volatile unsigned long *)(0x60006008))
125#define DEV_EN (*(volatile unsigned long *)(0x6000600c)) 125#define DEV_EN (*(volatile unsigned long *)(0x6000600c))
126#define DEV_EN2 (*(volatile unsigned long *)(0x60006010))
126 127
127#define DEV_SYSTEM 0x00000004 128#define DEV_SYSTEM 0x00000004
128#define DEV_SER0 0x00000040 129#define DEV_SER0 0x00000040
@@ -141,6 +142,7 @@
141#define CLOCK_SOURCE (*(volatile unsigned long *)(0x60006020)) 142#define CLOCK_SOURCE (*(volatile unsigned long *)(0x60006020))
142#define PLL_CONTROL (*(volatile unsigned long *)(0x60006034)) 143#define PLL_CONTROL (*(volatile unsigned long *)(0x60006034))
143#define PLL_STATUS (*(volatile unsigned long *)(0x6000603c)) 144#define PLL_STATUS (*(volatile unsigned long *)(0x6000603c))
145#define ADC_CLOCK_SRC (*(volatile unsigned long *)(0x60006094))
144#define CLCD_CLOCK_SRC (*(volatile unsigned long *)(0x600060a0)) 146#define CLCD_CLOCK_SRC (*(volatile unsigned long *)(0x600060a0))
145 147
146/* Processors Control */ 148/* Processors Control */
@@ -304,7 +306,8 @@
304#define RAM_TYPE_MASK 0x000000c0 306#define RAM_TYPE_MASK 0x000000c0
305#define ROM_TYPE_MASK 0x00000008 307#define ROM_TYPE_MASK 0x00000008
306 308
307#define DEV_INIT (*(volatile unsigned long *)(0x70000020)) 309#define DEV_INIT1 (*(volatile unsigned long *)(0x70000010))
310#define DEV_INIT2 (*(volatile unsigned long *)(0x70000020))
308/* some timing that needs to be handled during clock setup */ 311/* some timing that needs to be handled during clock setup */
309#define DEV_TIMING1 (*(volatile unsigned long *)(0x70000034)) 312#define DEV_TIMING1 (*(volatile unsigned long *)(0x70000034))
310#define XMB_NOR_CFG (*(volatile unsigned long *)(0x70000038)) 313#define XMB_NOR_CFG (*(volatile unsigned long *)(0x70000038))