From 95726a5c239d37a453efa7fe4e2f7cfdb96f536b Mon Sep 17 00:00:00 2001 From: Bertrik Sikken Date: Sun, 26 Oct 2008 13:28:52 +0000 Subject: 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 --- bootloader/sansa_as3525.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'bootloader') 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 */ -- cgit v1.2.3