summaryrefslogtreecommitdiffstats
path: root/bootloader
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2008-10-26 13:28:52 +0000
committerBertrik Sikken <bertrik@sikken.nl>2008-10-26 13:28:52 +0000
commit95726a5c239d37a453efa7fe4e2f7cfdb96f536b (patch)
tree35f2a66a2ea58ddb1fff97a51018c26cbeefbb51 /bootloader
parent92683778f615a5ff079fec12ea256643c669194a (diff)
downloadrockbox-95726a5c239d37a453efa7fe4e2f7cfdb96f536b.tar.gz
rockbox-95726a5c239d37a453efa7fe4e2f7cfdb96f536b.tar.bz2
rockbox-95726a5c239d37a453efa7fe4e2f7cfdb96f536b.zip
FS#9503 - Sansa v2 audio/PMU communication driver (for the AS3525 SoC)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18886 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader')
-rw-r--r--bootloader/sansa_as3525.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/bootloader/sansa_as3525.c b/bootloader/sansa_as3525.c
index b9975a9722..6f230c2628 100644
--- a/bootloader/sansa_as3525.c
+++ b/bootloader/sansa_as3525.c
@@ -28,10 +28,14 @@
#include "lcd.h"
#include "common.h"
#include "config.h"
+#include "as3525-codec.h"
int show_logo(void);
void main(void)
{
+ int i;
+ unsigned char buf[8];
+
lcd_init_device();
lcd_clear_display();
@@ -43,6 +47,13 @@ void main(void)
show_logo();
+ /* show player id to demonstrate communication with codec part */
+ as3525_codec_init();
+ for (i = 0; i < 8; i++) {
+ buf[i] = as3525_codec_read(0x38 + i);
+ }
+ printf("ID: %02X%02X%02X%02X%02X%02X%02X%02X", buf[7], buf[6], buf[5], buf[4], buf[3], buf[2], buf[1], buf[0]);
+
#ifdef SANSA_CLIP
/* Use hardware scrolling */