summaryrefslogtreecommitdiff
path: root/firmware/export
diff options
context:
space:
mode:
authorPeter D'Hoye <peter.dhoye@gmail.com>2006-08-15 22:54:06 +0000
committerPeter D'Hoye <peter.dhoye@gmail.com>2006-08-15 22:54:06 +0000
commitc4a59a290b81cae137f8b3c2b709c9c565701eb9 (patch)
tree9d54832f14b8fe365e427152011b62026f61e898 /firmware/export
parent98c9f959e53536a0b63d0376fad198ef883c5c03 (diff)
downloadrockbox-c4a59a290b81cae137f8b3c2b709c9c565701eb9.tar.gz
rockbox-c4a59a290b81cae137f8b3c2b709c9c565701eb9.zip
eeprom driver for the h3x0 series, cleaned up the h1x0 series driver a bit, added debug entry for h3x0 that allows to write to the eeprom
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10597 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export')
-rw-r--r--firmware/export/config-h100.h2
-rw-r--r--firmware/export/config-h120.h3
-rw-r--r--firmware/export/config-h300.h3
-rw-r--r--firmware/export/eeprom_24cxx.h5
-rw-r--r--firmware/export/pcf50606.h8
5 files changed, 20 insertions, 1 deletions
diff --git a/firmware/export/config-h100.h b/firmware/export/config-h100.h
index 88108c71f7..38f26c104b 100644
--- a/firmware/export/config-h100.h
+++ b/firmware/export/config-h100.h
@@ -129,7 +129,7 @@
129 129
130/* Define this if there is an EEPROM chip */ 130/* Define this if there is an EEPROM chip */
131/* Someone with H100 and BDM, please verify if this works. */ 131/* Someone with H100 and BDM, please verify if this works. */
132// #define HAVE_EEPROM 132/* #define HAVE_EEPROM */
133 133
134#endif /* !SIMULATOR */ 134#endif /* !SIMULATOR */
135 135
diff --git a/firmware/export/config-h120.h b/firmware/export/config-h120.h
index ca618139e9..a9b0ed3039 100644
--- a/firmware/export/config-h120.h
+++ b/firmware/export/config-h120.h
@@ -125,6 +125,9 @@
125/* Define this if there is an EEPROM chip */ 125/* Define this if there is an EEPROM chip */
126#define HAVE_EEPROM 126#define HAVE_EEPROM
127 127
128/* Define this if the EEPROM chip is used */
129#define HAVE_EEPROM_SETTINGS
130
128#endif /* !SIMULATOR */ 131#endif /* !SIMULATOR */
129 132
130/* Define this for S/PDIF input available */ 133/* Define this for S/PDIF input available */
diff --git a/firmware/export/config-h300.h b/firmware/export/config-h300.h
index f3ba076334..2a174bc4e5 100644
--- a/firmware/export/config-h300.h
+++ b/firmware/export/config-h300.h
@@ -133,4 +133,7 @@
133/* define this if the unit can be powered or charged via USB */ 133/* define this if the unit can be powered or charged via USB */
134#define HAVE_USB_POWER 134#define HAVE_USB_POWER
135 135
136/* Define this if there is an EEPROM chip */
137#define HAVE_EEPROM
138
136#endif /* SIMULATOR */ 139#endif /* SIMULATOR */
diff --git a/firmware/export/eeprom_24cxx.h b/firmware/export/eeprom_24cxx.h
index bc0f444f7e..c52dd830ef 100644
--- a/firmware/export/eeprom_24cxx.h
+++ b/firmware/export/eeprom_24cxx.h
@@ -20,8 +20,13 @@
20#ifndef _EEPROM_24CXX_H 20#ifndef _EEPROM_24CXX_H
21#define _EEPROM_24CXX_H 21#define _EEPROM_24CXX_H
22 22
23#ifdef IRIVER_H300_SERIES
24#define EEPROM_ADDR 0xA2
25#define EEPROM_SIZE 256
26#else
23#define EEPROM_ADDR 0xA0 27#define EEPROM_ADDR 0xA0
24#define EEPROM_SIZE 128 28#define EEPROM_SIZE 128
29#endif
25 30
26void eeprom_24cxx_init(void); 31void eeprom_24cxx_init(void);
27int eeprom_24cxx_read_byte(unsigned int address, char *c); 32int eeprom_24cxx_read_byte(unsigned int address, char *c);
diff --git a/firmware/export/pcf50606.h b/firmware/export/pcf50606.h
index d9f44bb577..3e567c963c 100644
--- a/firmware/export/pcf50606.h
+++ b/firmware/export/pcf50606.h
@@ -26,4 +26,12 @@ int pcf50606_write(int address, unsigned char val);
26int pcf50606_read_multiple(int address, unsigned char* buf, int count); 26int pcf50606_read_multiple(int address, unsigned char* buf, int count);
27int pcf50606_read(int address); 27int pcf50606_read(int address);
28 28
29/* internal low level calls used by the eeprom driver for h300 */
30void pcf50606_i2c_start(void);
31void pcf50606_i2c_stop(void);
32void pcf50606_i2c_ack(bool ack);
33bool pcf50606_i2c_getack(void);
34void pcf50606_i2c_outb(unsigned char byte);
35unsigned char pcf50606_i2c_inb(bool ack);
36
29#endif 37#endif