From 6a3c096bc5f220bc488b573032d14621a444f051 Mon Sep 17 00:00:00 2001 From: Gavan Fantom Date: Mon, 23 May 2011 21:44:25 +0000 Subject: [PATCH] Tidy up #ifdeffery for i2c speed --- i2c.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/i2c.c b/i2c.c index 45bb3a3..adf5ddf 100644 --- a/i2c.c +++ b/i2c.c @@ -25,17 +25,12 @@ void init_i2c(void) { IREG(I2CONSET) = 0x40; /* Enable I2C ready for Master Tx */ /* Set up for just under 400kHz */ -#if 0 +#ifdef I2C_FAST IWREG(I2SCLL) = (25 * 100); IWREG(I2SCLH) = (12 * 100); #else -# if 0 - IWREG(I2SCLL) = 1475; /* ~5kHz */ - IWREG(I2SCLH) = 1475; -# else IWREG(I2SCLL) = 73; /* ~100kHz */ IWREG(I2SCLH) = 73; -# endif #endif }