projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove from wizart i2c backend selection. Add deprecate switch to disable old i2c...
[bertos.git]
/
bertos
/
cpu
/
avr
/
drv
/
i2c_avr.c
diff --git
a/bertos/cpu/avr/drv/i2c_avr.c
b/bertos/cpu/avr/drv/i2c_avr.c
index ebbe5a2938ff50fe04a5f8f6ec869fe3ff974a54..8e56d13599d24764c57fdbd8984a4801cf78fd66 100644
(file)
--- a/
bertos/cpu/avr/drv/i2c_avr.c
+++ b/
bertos/cpu/avr/drv/i2c_avr.c
@@
-37,10
+37,11
@@
* \author Daniele Basile <asterix@develer.com>
*/
* \author Daniele Basile <asterix@develer.com>
*/
-#include <hw/hw_cpufreq.h> /* CPU_FREQ */
#include "cfg/cfg_i2c.h"
#include "cfg/cfg_i2c.h"
+#include <hw/hw_cpufreq.h> /* CPU_FREQ */
+
#define LOG_LEVEL I2C_LOG_LEVEL
#define LOG_FORMAT I2C_LOG_FORMAT
#define LOG_LEVEL I2C_LOG_LEVEL
#define LOG_FORMAT I2C_LOG_FORMAT
@@
-59,6
+60,7
@@
#include <compat/twi.h>
#include <compat/twi.h>
+#if !CONFIG_I2C_DISABLE_OLD_API
/* Wait for TWINT flag set: bus is ready */
#define WAIT_TWI_READY do {} while (!(TWCR & BV(TWINT)))
/* Wait for TWINT flag set: bus is ready */
#define WAIT_TWI_READY do {} while (!(TWCR & BV(TWINT)))
@@
-254,11
+256,11
@@
void i2c_builtin_init(void)
MOD_INIT(i2c);
}
MOD_INIT(i2c);
}
+#endif /* !CONFIG_I2C_DISABLE_OLD_API */
+
/*
* New Api
*/
/*
* New Api
*/
-
-
struct I2cHardware
{
};
struct I2cHardware
{
};