diff options
author | Amaury Pouly <pamaury@rockbox.org> | 2011-07-23 11:45:22 +0000 |
---|---|---|
committer | Amaury Pouly <pamaury@rockbox.org> | 2011-07-23 11:45:22 +0000 |
commit | eb90d956935019f577311ebc7aec3a7898d76019 (patch) | |
tree | c4ac810faaf390b9020c46dc2197008679099034 /firmware/target/arm/imx233/sansa-fuzeplus/fmradio-i2c-fuzeplus.c | |
parent | 06c94740e510d0ce04e069f34631a0539e9e6742 (diff) |
imx233/fuze+: huge rework
- enable MMU
-rework lcd frame buffer
- add rtc/adc/power stubs (or not)
- fix a few MMC related defines (hopefully)
- implement cache handling for DMA
- more SD work
- add keymap (based on clip)
- add virtual buttons
- update linker scripts
- big step toward apps actually compiling
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30200 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/imx233/sansa-fuzeplus/fmradio-i2c-fuzeplus.c')
-rw-r--r-- | firmware/target/arm/imx233/sansa-fuzeplus/fmradio-i2c-fuzeplus.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/fmradio-i2c-fuzeplus.c b/firmware/target/arm/imx233/sansa-fuzeplus/fmradio-i2c-fuzeplus.c index 5882a7da9f..d4113332ac 100644 --- a/firmware/target/arm/imx233/sansa-fuzeplus/fmradio-i2c-fuzeplus.c +++ b/firmware/target/arm/imx233/sansa-fuzeplus/fmradio-i2c-fuzeplus.c @@ -85,22 +85,17 @@ struct i2c_interface fmradio_i2c = .delay_thigh = 4 }; -void fmradio_i2c_init(void) +void fmradio_i2c_enable(bool enable) { + if(fmradio_i2c_bus == -1) + fmradio_i2c_bus = i2c_add_node(&fmradio_i2c); imx233_set_pin_function(0, 29, PINCTRL_FUNCTION_GPIO); imx233_set_pin_function(1, 24, PINCTRL_FUNCTION_GPIO); imx233_set_pin_function(1, 22, PINCTRL_FUNCTION_GPIO); - imx233_enable_gpio_output(1, 22, true); - imx233_enable_gpio_output(1, 24, true); - imx233_set_gpio_output(1, 22, true); - imx233_set_gpio_output(1, 24, true); - fmradio_i2c_bus = i2c_add_node(&fmradio_i2c); -} - -void fmradio_i2c_enable(bool enable) -{ - imx233_enable_gpio_output(0, 29, enable); - imx233_set_gpio_output(0, 29, enable); + imx233_enable_gpio_output(1, 22, enable); + imx233_enable_gpio_output(1, 24, enable); + imx233_set_gpio_output(1, 22, enable); + imx233_set_gpio_output(1, 24, enable); } int fmradio_i2c_write(unsigned char address, const unsigned char* buf, int count) |