X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=boards%2Fek-lm3s1968%2Ftemplates%2Fkernel%2Fcfg%2Fcfg_i2c.h;fp=boards%2Fek-lm3s1968%2Ftemplates%2Fkernel%2Fcfg%2Fcfg_i2c.h;h=7df0d097746c4e5c28c4130550c25135018a9e0b;hb=b99421f706c4f6978a6d399cba3bf4d9a383cb2c;hp=0000000000000000000000000000000000000000;hpb=d12c2ff70014db4b352013658ad121df51bc9c48;p=bertos.git diff --git a/boards/ek-lm3s1968/templates/kernel/cfg/cfg_i2c.h b/boards/ek-lm3s1968/templates/kernel/cfg/cfg_i2c.h new file mode 100644 index 00000000..7df0d097 --- /dev/null +++ b/boards/ek-lm3s1968/templates/kernel/cfg/cfg_i2c.h @@ -0,0 +1,88 @@ +/** + * \file + * + * + * \brief Configuration file for I2C module. + * + * \author Daniele Basile + */ + +#ifndef CFG_I2C_H +#define CFG_I2C_H + +/** +*Comunication frequency. +* +* $WIZ$ type = "int" +*/ +#define CONFIG_I2C_FREQ 100000UL + +/** + * I2C start timeout. + * For how many milliseconds the i2c_start + * should try to get an ACK before + * returning error. + * + * $WIZ$ type = "int" + */ +#define CONFIG_I2C_START_TIMEOUT 100 + +/** + * I2C backend the driver should use. + * + * I2C_BACKEND_BUILTIN: Use (if present) the builtin i2c hardware. + * I2C_BACKEND_BITBANG: Use the emulated bitbang driver. + * \see drv/i2c.h for more information. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "i2c_backend" + */ +#define CONFIG_I2C_BACKEND I2C_BACKEND_BUILTIN + +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define I2C_LOG_LEVEL LOG_LVL_INFO + +/** + * module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define I2C_LOG_FORMAT LOG_FMT_TERSE + +#endif /* CFG_I2C_H */ + +