summaryrefslogtreecommitdiffstats
path: root/firmware
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2005-07-12 05:25:03 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2005-07-12 05:25:03 +0000
commit3382abaf583b8fd9576dfa00bd5041b22afcfb7e (patch)
tree9c99335940f7e872125b3ebeeb19d4e7dfa1eacf /firmware
parent56fb17711190354db3359ddfc15b82ba6ab87fe1 (diff)
downloadrockbox-3382abaf583b8fd9576dfa00bd5041b22afcfb7e.tar.gz
rockbox-3382abaf583b8fd9576dfa00bd5041b22afcfb7e.zip
added uda1380_reset()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7112 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/uda1380.c19
-rw-r--r--firmware/export/uda1380.h2
2 files changed, 12 insertions, 9 deletions
diff --git a/firmware/drivers/uda1380.c b/firmware/drivers/uda1380.c
index 1636f13365..1f31c4c855 100644
--- a/firmware/drivers/uda1380.c
+++ b/firmware/drivers/uda1380.c
@@ -164,17 +164,20 @@ void uda1380_enable_output(bool enable)
}
}
-/* Initialize UDA1380 codec with default register values (uda1380_defaults) */
-int uda1380_init(void)
+void uda1380_reset(void)
{
/* RESET signal */
- GPIO_OUT |= (1<<29);
- GPIO_ENABLE |= (1<<29);
- GPIO_FUNCTION |= (1<<29);
-
+ or_l(1<<29, &GPIO_OUT);
+ or_l(1<<29, &GPIO_ENABLE);
+ or_l(1<<29, &GPIO_FUNCTION);
sleep(HZ/100);
-
- GPIO_OUT &= ~(1<<29);
+ and_l(~(1<<29), &GPIO_OUT);
+}
+
+/* Initialize UDA1380 codec with default register values (uda1380_defaults) */
+int uda1380_init(void)
+{
+ uda1380_reset();
if (uda1380_set_regs() == -1)
return -1;
diff --git a/firmware/export/uda1380.h b/firmware/export/uda1380.h
index b5a31e33fe..3bef5439b5 100644
--- a/firmware/export/uda1380.h
+++ b/firmware/export/uda1380.h
@@ -19,7 +19,7 @@
#ifndef _UDA1380_H
#define _UDA1380_H
-
+extern void uda1380_reset(void);
extern int uda1380_init(void);
extern void uda1380_enable_output(bool enable);
extern int uda1380_set_master_vol(int vol_l, int vol_r);