From: batt Date: Tue, 11 Nov 2008 17:30:56 +0000 (+0000) Subject: Update to new i2c driver name. X-Git-Tag: 2.0.0~9 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=80b5cba991a546308261ebbf67c0929d1c134ca6;p=bertos.git Update to new i2c driver name. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1925 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/cpu/arm/drv/twi_at91.c b/bertos/cpu/arm/drv/twi_at91.c index 49fd74ae..44957c45 100644 --- a/bertos/cpu/arm/drv/twi_at91.c +++ b/bertos/cpu/arm/drv/twi_at91.c @@ -39,7 +39,7 @@ #include "twi_at91.h" -#include "cfg/cfg_twi.h" +#include "cfg/cfg_i2c.h" #include #include #include @@ -254,7 +254,7 @@ void twi_init(void) * Only CLDIV is computed since CLDIV = CHDIV (50% duty cycle) */ uint16_t cldiv, ckdiv = 0; - while ((cldiv = ((CLOCK_FREQ / (2 * CONFIG_TWI_FREQ)) - 3) / (1 << ckdiv)) > 255) + while ((cldiv = ((CLOCK_FREQ / (2 * CONFIG_I2C_FREQ)) - 3) / (1 << ckdiv)) > 255) ckdiv++; /* Atmel errata states that ckdiv *must* be less than 5 for unknown reason */