mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
Abstract the PortalPlayer AS3514 handling with an "ascodec" API - inspired by the wmcodec API used with the Wolfson codecs. The intention is to implement this API for the AS3525 and then share code with the Sansa V2 ports.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18940 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
324816f019
commit
42f77d4eb0
15 changed files with 196 additions and 61 deletions
|
@ -46,7 +46,7 @@
|
|||
/* TODO: Move target-specific stuff somewhere else (serial number reading) */
|
||||
|
||||
#ifdef HAVE_AS3514
|
||||
#include "i2c-pp.h"
|
||||
#include "ascodec.h"
|
||||
#include "as3514.h"
|
||||
#endif
|
||||
|
||||
|
@ -274,7 +274,7 @@ static void set_serial_descriptor(void)
|
|||
short* p = &usb_string_iSerial.wString[1];
|
||||
int i;
|
||||
|
||||
i2c_readbytes(AS3514_I2C_ADDR, AS3514_UID_0, 0x10, serial);
|
||||
ascodec_readbytes(AS3514_UID_0, 0x10, serial);
|
||||
for (i = 0; i < 16; i++) {
|
||||
*p++ = hex[(serial[i] >> 4) & 0xF];
|
||||
*p++ = hex[(serial[i] >> 0) & 0xF];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue