+/**
+ * \ingroup old_i2c_api
+ * \name I2C Backends.
+ * Sometimes your cpu does not have a builtin
+ * i2c driver or you don't want, for some reason, to
+ * use that.
+ * With this you can choose, at compile time, which backend to use.
+ * Set the CONFIG_I2C_BACKEND configuration variable in cfg_i2c.h
+ * @{
+ */
+#define I2C_BACKEND_BUILTIN 0 ///< Uses cpu builtin i2c driver
+#define I2C_BACKEND_BITBANG 1 ///< Uses emulated bitbang driver
+/**@}*/
+
+/**
+ * \name I2c builtin prototypes.
+ * \ingroup old_i2c_api
+ * Do NOT use these function directly, instead,
+ * you can call the ones named without "_builtin_"
+ * and specify in cfg_i2c.h (CONFIG_I2C_BACKEND)
+ * that you want the builtin backend.
+ * @{
+ */
+bool i2c_builtin_start_w(uint8_t id);
+bool i2c_builtin_start_r(uint8_t id);
+void i2c_builtin_stop(void);
+bool i2c_builtin_put(uint8_t _data);
+int i2c_builtin_get(bool ack);
+/**@}*/
+
+/**
+ * \name I2c bitbang prototypes.
+ * \ingroup old_i2c_api
+ * Do NOT use these function directly, instead,
+ * you can call the ones named without "_bitbang_"
+ * and specify in cfg_i2c.h (CONFIG_I2C_BACKEND)
+ * that you want the bitbang backend.
+ * @{
+ */
+bool i2c_bitbang_start_w(uint8_t id);
+bool i2c_bitbang_start_r(uint8_t id);
+void i2c_bitbang_stop(void);
+bool i2c_bitbang_put(uint8_t _data);
+int i2c_bitbang_get(bool ack);
+/**@}*/
+
+#ifndef CONFIG_I2C_BACKEND
+#define CONFIG_I2C_BACKEND I2C_BACKEND_BUILTIN
+#endif
+
+#if CONFIG_I2C_BACKEND == I2C_BACKEND_BUILTIN
+ #define i2c_start_w_1 i2c_builtin_start_w
+ #define i2c_start_r_1 i2c_builtin_start_r
+ #define i2c_stop i2c_builtin_stop
+ #define i2c_put i2c_builtin_put
+ #define i2c_get i2c_builtin_get
+#elif CONFIG_I2C_BACKEND == I2C_BACKEND_BITBANG
+ #define i2c_start_w_1 i2c_bitbang_start_w
+ #define i2c_start_r_1 i2c_bitbang_start_r
+ #define i2c_stop i2c_bitbang_stop
+ #define i2c_put i2c_bitbang_put
+ #define i2c_get i2c_bitbang_get
+#else
+ #error Unsupported i2c backend.
+#endif
+
+
+bool i2c_send(const void *_buf, size_t count);
+bool i2c_recv(void *_buf, size_t count);
+
+/**@}*/
+
+
+extern I2c local_i2c_old_api;
+
+/**
+ * Initialize I2C module (old API).
+ * \attention This function is deprecated. Use i2c_init(args...) in new code
+ */
+INLINE void i2c_init_0(void)