2008-10-31 00:16:42 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
* Copyright (C) 2008 by Dave Chapman
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef _ASCODEC_H
|
|
|
|
#define _ASCODEC_H
|
|
|
|
|
2008-10-31 00:37:58 +00:00
|
|
|
#include "config.h"
|
2012-01-08 01:43:16 +00:00
|
|
|
#include <stdbool.h>
|
2008-10-31 00:37:58 +00:00
|
|
|
|
2012-01-08 01:43:16 +00:00
|
|
|
#include "as3514.h"
|
|
|
|
|
|
|
|
#ifndef HAVE_AS3514
|
|
|
|
# error Only for AS3514!
|
|
|
|
#endif
|
|
|
|
|
|
|
|
void ascodec_init(void) INIT_ATTR;
|
|
|
|
void ascodec_close(void);
|
|
|
|
|
|
|
|
void ascodec_lock(void);
|
|
|
|
void ascodec_unlock(void);
|
|
|
|
|
2016-02-20 03:36:26 +00:00
|
|
|
void ascodec_write(unsigned int index, unsigned int value);
|
2012-01-08 01:43:16 +00:00
|
|
|
|
|
|
|
int ascodec_read(unsigned int index);
|
|
|
|
|
2016-02-20 03:36:26 +00:00
|
|
|
void ascodec_readbytes(unsigned int index, unsigned int len, unsigned char *data);
|
2012-01-08 01:43:16 +00:00
|
|
|
|
2017-01-21 13:04:43 +00:00
|
|
|
void ascodec_wait_adc_finished(void);
|
|
|
|
|
2016-03-30 12:50:40 +00:00
|
|
|
#if CONFIG_CHARGING
|
2012-01-08 01:43:16 +00:00
|
|
|
bool ascodec_endofch(void);
|
|
|
|
bool ascodec_chg_status(void);
|
|
|
|
void ascodec_monitor_endofch(void);
|
|
|
|
void ascodec_write_charger(int value);
|
|
|
|
int ascodec_read_charger(void);
|
2008-10-31 00:37:58 +00:00
|
|
|
#endif
|
2008-10-31 00:16:42 +00:00
|
|
|
|
2012-01-08 01:43:16 +00:00
|
|
|
#ifdef HAVE_AS3543
|
|
|
|
void ascodec_write_pmu(unsigned int index, unsigned int subreg,
|
|
|
|
unsigned int value);
|
|
|
|
int ascodec_read_pmu(unsigned int index, unsigned int subreg);
|
Initial commit of the Samsung YP-R0 port.
This port is a hybrid native/RaaA port. It runs on a embedded linux system,
but is the only application. It therefore can implement lots of stuff that
native targets also implement, while leveraging the underlying linux kernel.
The port is quite advanced. User interface, audio playback, plugins work
mostly fine. Missing is e.g. power mangement and USB (see SamsungYPR0 wiki page).
Included in utils/ypr0tools are scripts and programs required to generate
a patched firmware. The patched firmware has the rootfs modified to load
Rockbox. It includes a early/safe USB mode.
This port needs a new toolchain, one that includes glibc headers and libraries.
rockboxdev.sh can generate it, but e.g. codesourcey and distro packages may
also work.
Most of the initial effort is done by Lorenzo Miori and others (on ABI),
including reverse engineering and patching of the original firmware,
initial drivers, and more. Big thanks to you.
Flyspray: FS#12348
Author: Lorenzo Miori, myself
Merry christmas to ypr0 owners! :)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31415 a1c6a512-1295-4272-9138-f99709370657
2011-12-24 11:56:46 +00:00
|
|
|
#endif
|
|
|
|
|
2008-10-31 00:16:42 +00:00
|
|
|
#endif
|