From e4016834822e3211ff0693691c456f3d620cad0a Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Sat, 19 May 2012 18:03:27 +0200 Subject: zenxfi3&stfm1000: implement fmradio i2c and debug screen Change-Id: I83dbdee13185d9adcf590dc213da5a8c97adb2ba --- .../imx233/creative-zenxfi3/fmradio-i2c-zenxfi3.c | 40 ++++++++++++++++++++++ firmware/target/arm/imx233/system-imx233.c | 3 +- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 firmware/target/arm/imx233/creative-zenxfi3/fmradio-i2c-zenxfi3.c (limited to 'firmware/target/arm/imx233') diff --git a/firmware/target/arm/imx233/creative-zenxfi3/fmradio-i2c-zenxfi3.c b/firmware/target/arm/imx233/creative-zenxfi3/fmradio-i2c-zenxfi3.c new file mode 100644 index 0000000000..58ac8e6a08 --- /dev/null +++ b/firmware/target/arm/imx233/creative-zenxfi3/fmradio-i2c-zenxfi3.c @@ -0,0 +1,40 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2012 by Amaury Pouly + * + * 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. + * + ****************************************************************************/ + +#include "config.h" +#include "system.h" +#include "fmradio_i2c.h" +#include "pinctrl-imx233.h" +#include "i2c.h" + +void fmradio_i2c_init(void) +{ +} + +int fmradio_i2c_write(unsigned char address, const unsigned char* buf, int count) +{ + return i2c_write(address, buf, count); +} + +int fmradio_i2c_read(unsigned char address, unsigned char* buf, int count) +{ + return i2c_read(address, buf, count); +} diff --git a/firmware/target/arm/imx233/system-imx233.c b/firmware/target/arm/imx233/system-imx233.c index 5ef52c7957..a24927f9a5 100644 --- a/firmware/target/arm/imx233/system-imx233.c +++ b/firmware/target/arm/imx233/system-imx233.c @@ -110,7 +110,8 @@ void system_init(void) imx233_pwm_init(); imx233_lradc_init(); imx233_i2c_init(); -#if defined(SANSA_FUZEPLUS) && !defined(BOOTLOADER) +#if !defined(BOOTLOADER) && \ + (defined(SANSA_FUZEPLUS) || defined(CREATIVE_ZENXFI3)) fmradio_i2c_init(); #endif } -- cgit v1.2.3