summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525/fmradio-i2c-as3525.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/as3525/fmradio-i2c-as3525.c')
-rw-r--r--firmware/target/arm/as3525/fmradio-i2c-as3525.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/firmware/target/arm/as3525/fmradio-i2c-as3525.c b/firmware/target/arm/as3525/fmradio-i2c-as3525.c
index 31d701dc6d..33d12f9fa7 100644
--- a/firmware/target/arm/as3525/fmradio-i2c-as3525.c
+++ b/firmware/target/arm/as3525/fmradio-i2c-as3525.c
@@ -30,7 +30,6 @@
30#include "as3525.h" 30#include "as3525.h"
31#include "generic_i2c.h" 31#include "generic_i2c.h"
32#include "fmradio_i2c.h" 32#include "fmradio_i2c.h"
33#include "system.h"
34 33
35#if defined(SANSA_CLIP) || defined(SANSA_C200V2) 34#if defined(SANSA_CLIP) || defined(SANSA_C200V2)
36#define I2C_SCL_GPIO(x) GPIOB_PIN(x) 35#define I2C_SCL_GPIO(x) GPIOB_PIN(x)
@@ -168,13 +167,11 @@ void fmradio_i2c_init(void)
168int fmradio_i2c_write(unsigned char address, const unsigned char* buf, int count) 167int fmradio_i2c_write(unsigned char address, const unsigned char* buf, int count)
169{ 168{
170#ifdef SANSA_FUZEV2 169#ifdef SANSA_FUZEV2
171 int s = disable_irq_save();
172 CCU_IO &= ~(1<<12); 170 CCU_IO &= ~(1<<12);
173#endif 171#endif
174 int ret = i2c_write_data(fm_i2c_bus, address, -1, buf, count); 172 int ret = i2c_write_data(fm_i2c_bus, address, -1, buf, count);
175#ifdef SANSA_FUZEV2 173#ifdef SANSA_FUZEV2
176 CCU_IO |= 1<<12; 174 CCU_IO |= 1<<12;
177 restore_irq(s);
178#endif 175#endif
179 return ret; 176 return ret;
180} 177}
@@ -182,13 +179,11 @@ int fmradio_i2c_write(unsigned char address, const unsigned char* buf, int count
182int fmradio_i2c_read(unsigned char address, unsigned char* buf, int count) 179int fmradio_i2c_read(unsigned char address, unsigned char* buf, int count)
183{ 180{
184#ifdef SANSA_FUZEV2 181#ifdef SANSA_FUZEV2
185 int s = disable_irq_save();
186 CCU_IO &= ~(1<<12); 182 CCU_IO &= ~(1<<12);
187#endif 183#endif
188 int ret = i2c_read_data(fm_i2c_bus, address, -1, buf, count); 184 int ret = i2c_read_data(fm_i2c_bus, address, -1, buf, count);
189#ifdef SANSA_FUZEV2 185#ifdef SANSA_FUZEV2
190 CCU_IO |= 1<<12; 186 CCU_IO |= 1<<12;
191 restore_irq(s);
192#endif 187#endif
193 return ret; 188 return ret;
194} 189}