From 3cb7cab5342be9d9e793c7e43ea83a27fe1eb04f Mon Sep 17 00:00:00 2001 From: idgay Date: Fri, 13 Mar 2009 19:15:35 +0000 Subject: [PATCH] add a #ifdef (ATM128_I2C_EXTERNAL_PULLDOWN) to control the external pulldown presence --- tos/chips/atm128/i2c/Atm128I2C.h | 4 ++++ tos/chips/atm128/i2c/Atm128I2CMasterPacketP.nc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tos/chips/atm128/i2c/Atm128I2C.h b/tos/chips/atm128/i2c/Atm128I2C.h index 75fd6643..94589c1f 100644 --- a/tos/chips/atm128/i2c/Atm128I2C.h +++ b/tos/chips/atm128/i2c/Atm128I2C.h @@ -47,4 +47,8 @@ enum { ATM128_I2C_MR_DATA_NACK = 0x58 }; +#ifndef ATM128_I2C_EXTERNAL_PULLDOWN +#define ATM128_I2C_EXTERNAL_PULLDOWN FALSE +#endif + #endif // _H_Atm128I2C_h diff --git a/tos/chips/atm128/i2c/Atm128I2CMasterPacketP.nc b/tos/chips/atm128/i2c/Atm128I2CMasterPacketP.nc index 35cf2293..b00c4fe2 100644 --- a/tos/chips/atm128/i2c/Atm128I2CMasterPacketP.nc +++ b/tos/chips/atm128/i2c/Atm128I2CMasterPacketP.nc @@ -93,7 +93,7 @@ implementation { async command error_t AsyncStdControl.start() { atomic { if (state == I2C_OFF) { - call I2C.init(FALSE); + call I2C.init(ATM128_I2C_EXTERNAL_PULLDOWN); call I2C.readCurrent(); call I2C.enable(TRUE); call I2C.enableInterrupt(FALSE); -- 2.39.2