projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add bitarray test. Fixes and add dump function.
[bertos.git]
/
bertos
/
cpu
/
arm
/
drv
/
twi_at91.c
diff --git
a/bertos/cpu/arm/drv/twi_at91.c
b/bertos/cpu/arm/drv/twi_at91.c
index 49fd74ae8c41bb496ec9115277cc1400b6f6aade..ad95f50cb80f6155ee3c34b0c194dc68fb380742 100644
(file)
--- a/
bertos/cpu/arm/drv/twi_at91.c
+++ b/
bertos/cpu/arm/drv/twi_at91.c
@@
-32,14
+32,13
@@
*
* \brief Driver for the AT91 ARM TWI (implementation)
*
*
* \brief Driver for the AT91 ARM TWI (implementation)
*
- * \version $Id$
*
* \author Francesco Sacchi <batt@develer.com>
*/
#include "twi_at91.h"
*
* \author Francesco Sacchi <batt@develer.com>
*/
#include "twi_at91.h"
-#include "cfg/cfg_
twi
.h"
+#include "cfg/cfg_
i2c
.h"
#include <cfg/compiler.h>
#include <cfg/debug.h>
#include <cfg/macros.h>
#include <cfg/compiler.h>
#include <cfg/debug.h>
#include <cfg/macros.h>
@@
-254,7
+253,7
@@
void twi_init(void)
* Only CLDIV is computed since CLDIV = CHDIV (50% duty cycle)
*/
uint16_t cldiv, ckdiv = 0;
* Only CLDIV is computed since CLDIV = CHDIV (50% duty cycle)
*/
uint16_t cldiv, ckdiv = 0;
- while ((cldiv = ((C
LOCK_FREQ / (2 * CONFIG_TWI
_FREQ)) - 3) / (1 << ckdiv)) > 255)
+ while ((cldiv = ((C
PU_FREQ / (2 * CONFIG_I2C
_FREQ)) - 3) / (1 << ckdiv)) > 255)
ckdiv++;
/* Atmel errata states that ckdiv *must* be less than 5 for unknown reason */
ckdiv++;
/* Atmel errata states that ckdiv *must* be less than 5 for unknown reason */