X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Farm%2Fdrv%2Ftwi_at91.c;h=ad95f50cb80f6155ee3c34b0c194dc68fb380742;hb=f1fab319eb3fe91c157b3a9564841aef62a03554;hp=44957c45d7c11e7c2b4f9677e661b4684de84fbb;hpb=80b5cba991a546308261ebbf67c0929d1c134ca6;p=bertos.git diff --git a/bertos/cpu/arm/drv/twi_at91.c b/bertos/cpu/arm/drv/twi_at91.c index 44957c45..ad95f50c 100644 --- a/bertos/cpu/arm/drv/twi_at91.c +++ b/bertos/cpu/arm/drv/twi_at91.c @@ -32,7 +32,6 @@ * * \brief Driver for the AT91 ARM TWI (implementation) * - * \version $Id$ * * \author Francesco Sacchi */ @@ -254,7 +253,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_I2C_FREQ)) - 3) / (1 << ckdiv)) > 255) + while ((cldiv = ((CPU_FREQ / (2 * CONFIG_I2C_FREQ)) - 3) / (1 << ckdiv)) > 255) ckdiv++; /* Atmel errata states that ckdiv *must* be less than 5 for unknown reason */