diff options
author | Rob Purchase <shotofadds@rockbox.org> | 2009-10-11 21:12:06 +0000 |
---|---|---|
committer | Rob Purchase <shotofadds@rockbox.org> | 2009-10-11 21:12:06 +0000 |
commit | 7cfd418a9bce7d092b671c0ea42520f68f6b6df1 (patch) | |
tree | 3c46b17a246d0bdb3b2e5cb3f420f2cbd6f47b29 /firmware/drivers/pcf50606.c | |
parent | e99dd1898ec346e9c7ca4dbd266b9a305c1441d8 (diff) | |
download | rockbox-7cfd418a9bce7d092b671c0ea42520f68f6b6df1.tar.gz rockbox-7cfd418a9bce7d092b671c0ea42520f68f6b6df1.zip |
D2: Reduce binsize a bit by using arrays for the PMU initialisation.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23120 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/pcf50606.c')
-rw-r--r-- | firmware/drivers/pcf50606.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/firmware/drivers/pcf50606.c b/firmware/drivers/pcf50606.c index 4ef747fe80..d44718c58b 100644 --- a/firmware/drivers/pcf50606.c +++ b/firmware/drivers/pcf50606.c | |||
@@ -54,15 +54,21 @@ int pcf50606_read_multiple(int address, unsigned char* buf, int count) | |||
54 | void pcf50606_init(void) | 54 | void pcf50606_init(void) |
55 | { | 55 | { |
56 | #ifdef COWON_D2 | 56 | #ifdef COWON_D2 |
57 | /* Set outputs as per OF - further investigation required. */ | 57 | /* Set outputs as per OF - further investigation required. */ |
58 | pcf50606_write(PCF5060X_DCDEC1, 0xe4); | 58 | static const char init_data[] = |
59 | pcf50606_write(PCF5060X_IOREGC, 0xf5); | 59 | {PCF5060X_DCDEC1, 0xe4, |
60 | pcf50606_write(PCF5060X_D1REGC1, 0xf5); | 60 | PCF5060X_IOREGC, 0xf5, |
61 | pcf50606_write(PCF5060X_D2REGC1, 0xe9); | 61 | PCF5060X_D1REGC1, 0xf5, |
62 | pcf50606_write(PCF5060X_D3REGC1, 0xf8); /* WM8985 3.3v */ | 62 | PCF5060X_D2REGC1, 0xe9, |
63 | pcf50606_write(PCF5060X_DCUDC1, 0xe7); | 63 | PCF5060X_D3REGC1, 0xf8, /* WM8985 3.3v */ |
64 | pcf50606_write(PCF5060X_LPREGC1, 0x0); | 64 | PCF5060X_DCUDC1, 0xe7, |
65 | pcf50606_write(PCF5060X_LPREGC2, 0x2); | 65 | PCF5060X_LPREGC1, 0x0, |
66 | PCF5060X_LPREGC2, 0x2, | ||
67 | 0}; | ||
68 | |||
69 | const char* ptr; | ||
70 | for (ptr = init_data; *ptr != 0; ptr += 2) | ||
71 | pcf50606_write(ptr[0], ptr[1]); | ||
66 | #endif | 72 | #endif |
67 | } | 73 | } |
68 | 74 | ||