mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
Rename functions as3525_codec_* to ascodec_* to prepare re-use of as3514 code for sansa v2 players
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19047 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
aef27e1f0c
commit
4ca4e523fe
4 changed files with 9 additions and 9 deletions
|
|
@ -49,7 +49,7 @@ void main(void)
|
||||||
lcd_init();
|
lcd_init();
|
||||||
show_logo();
|
show_logo();
|
||||||
|
|
||||||
as3525_codec_init(); /* Required for backlight on e200v2 */
|
ascodec_init(); /* Required for backlight on e200v2 */
|
||||||
_backlight_on();
|
_backlight_on();
|
||||||
|
|
||||||
delay = 0x3000000;
|
delay = 0x3000000;
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@
|
||||||
|
|
||||||
|
|
||||||
/* initialises the internal i2c bus and prepares for transfers to the codec */
|
/* initialises the internal i2c bus and prepares for transfers to the codec */
|
||||||
void as3525_codec_init(void)
|
void ascodec_init(void)
|
||||||
{
|
{
|
||||||
/* reset device */
|
/* reset device */
|
||||||
CCU_SRC = CCU_SRC_I2C_AUDIO_EN;
|
CCU_SRC = CCU_SRC_I2C_AUDIO_EN;
|
||||||
|
|
@ -86,7 +86,7 @@ static int i2c_busy(void)
|
||||||
|
|
||||||
|
|
||||||
/* returns 0 on success, <0 otherwise */
|
/* returns 0 on success, <0 otherwise */
|
||||||
int as3525_codec_write(int index, int value)
|
int ascodec_write(int index, int value)
|
||||||
{
|
{
|
||||||
if (index == 0x21) {
|
if (index == 0x21) {
|
||||||
/* prevent setting of the LREG_CP_not bit */
|
/* prevent setting of the LREG_CP_not bit */
|
||||||
|
|
@ -112,7 +112,7 @@ int as3525_codec_write(int index, int value)
|
||||||
|
|
||||||
|
|
||||||
/* returns value read on success, <0 otherwise */
|
/* returns value read on success, <0 otherwise */
|
||||||
int as3525_codec_read(int index)
|
int ascodec_read(int index)
|
||||||
{
|
{
|
||||||
/* check if still busy */
|
/* check if still busy */
|
||||||
if (i2c_busy()) {
|
if (i2c_busy()) {
|
||||||
|
|
|
||||||
|
|
@ -19,9 +19,9 @@
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
void as3525_codec_init(void);
|
void ascodec_init(void);
|
||||||
|
|
||||||
int as3525_codec_write(int index, int value);
|
int ascodec_write(int index, int value);
|
||||||
int as3525_codec_read(int index);
|
int ascodec_read(int index);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -255,9 +255,9 @@ int system_memory_guard(int newmode)
|
||||||
void power_off(void)
|
void power_off(void)
|
||||||
{
|
{
|
||||||
int system;
|
int system;
|
||||||
system = as3525_codec_read(0x20);
|
system = ascodec_read(0x20);
|
||||||
system &= ~1; /* clear bit 0 of system register */
|
system &= ~1; /* clear bit 0 of system register */
|
||||||
as3525_codec_write(0x20, system);
|
ascodec_write(0x20, system);
|
||||||
|
|
||||||
/* TODO : turn off peripherals properly ? */
|
/* TODO : turn off peripherals properly ? */
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue