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
diff --git a/bootloader/sansa_as3525.c b/bootloader/sansa_as3525.c
index b9975a9..6f230c2 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 @@
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 */