projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
doc: Add further documentation for fatfile_open().
[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 2681bb75cdab39144fa33f1e8bdd00e80eab12cd..7425240305cebea0ea6ca383111c88305934b758 100644
(file)
--- a/
bertos/cpu/avr/drv/i2c_avr.c
+++ b/
bertos/cpu/avr/drv/i2c_avr.c
@@
-38,7
+38,7
@@
* \author Bernie Innocenti <bernie@codewiz.org>
*/
* \author Bernie Innocenti <bernie@codewiz.org>
*/
-#include
"hw/hw_cpu.h" /* CLOCK
_FREQ */
+#include
<hw/hw_cpufreq.h> /* CPU
_FREQ */
#include "cfg/cfg_i2c.h"
#include "cfg/cfg_i2c.h"
@@
-237,7
+237,7
@@
void i2c_builtin_init(void)
/*
* Set speed:
/*
* Set speed:
- * F = C
LOCK
_FREQ / (16 + 2*TWBR * 4^TWPS)
+ * F = C
PU
_FREQ / (16 + 2*TWBR * 4^TWPS)
*/
#ifndef CONFIG_I2C_FREQ
#warning Using default value of 300000L for CONFIG_I2C_FREQ
*/
#ifndef CONFIG_I2C_FREQ
#warning Using default value of 300000L for CONFIG_I2C_FREQ
@@
-245,7
+245,7
@@
void i2c_builtin_init(void)
#endif
#define TWI_PRESC 1 /* 4 ^ TWPS */
#endif
#define TWI_PRESC 1 /* 4 ^ TWPS */
- TWBR = (C
LOCK
_FREQ / (2 * CONFIG_I2C_FREQ * TWI_PRESC)) - (8 / TWI_PRESC);
+ TWBR = (C
PU
_FREQ / (2 * CONFIG_I2C_FREQ * TWI_PRESC)) - (8 / TWI_PRESC);
TWSR = 0;
TWCR = BV(TWEN);
);
TWSR = 0;
TWCR = BV(TWEN);
);