Remove from wizart i2c backend selection. Add deprecate switch to disable old i2c...
[bertos.git] / bertos / cpu / avr / drv / i2c_avr.c
index ebbe5a2938ff50fe04a5f8f6ec869fe3ff974a54..8e56d13599d24764c57fdbd8984a4801cf78fd66 100644 (file)
  * \author Daniele Basile <asterix@develer.com>
  */
 
-#include <hw/hw_cpufreq.h>  /* CPU_FREQ */
 
 #include "cfg/cfg_i2c.h"
 
+#include <hw/hw_cpufreq.h>  /* CPU_FREQ */
+
 #define LOG_LEVEL  I2C_LOG_LEVEL
 #define LOG_FORMAT I2C_LOG_FORMAT
 
@@ -59,6 +60,7 @@
 
 #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)))
@@ -254,11 +256,11 @@ void i2c_builtin_init(void)
        MOD_INIT(i2c);
 }
 
+#endif /* !CONFIG_I2C_DISABLE_OLD_API */
+
 /*
  * New Api
  */
-
-
 struct I2cHardware
 {
 };