aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32F1xx/I2C/tmp75.c
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-12-08 19:28:55 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-12-08 19:28:55 +0000
commit8196de6aef7616f7df96d757dddc9cfa9eb661dc (patch)
treeb8ad2a8049314384e30f414b146ee4a875fbc953 /testhal/STM32F1xx/I2C/tmp75.c
parentedfa9d2fae1d667b3f71a8e61aa954ac2233e493 (diff)
downloadChibiOS-8196de6aef7616f7df96d757dddc9cfa9eb661dc.tar.gz
ChibiOS-8196de6aef7616f7df96d757dddc9cfa9eb661dc.tar.bz2
ChibiOS-8196de6aef7616f7df96d757dddc9cfa9eb661dc.zip
I2C. Testhal update.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3584 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32F1xx/I2C/tmp75.c')
-rw-r--r--testhal/STM32F1xx/I2C/tmp75.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/testhal/STM32F1xx/I2C/tmp75.c b/testhal/STM32F1xx/I2C/tmp75.c
index 630a76dac..23410843f 100644
--- a/testhal/STM32F1xx/I2C/tmp75.c
+++ b/testhal/STM32F1xx/I2C/tmp75.c
@@ -38,6 +38,7 @@ static uint8_t tmp75_rx_data[TMP75_RX_DEPTH];
/* temperature value */
static int16_t temperature = 0;
+static i2cflags_t errors = 0;
#define tmp75_addr 0b1001000
@@ -46,7 +47,7 @@ void request_temperature(void){
int16_t t_int = 0, t_frac = 0;
i2cAcquireBus(&I2CD1);
- i2cMasterReceive(&I2CD1, tmp75_addr, tmp75_rx_data, 2);
+ i2cMasterReceive(&I2CD1, tmp75_addr, tmp75_rx_data, 2, &errors, TIME_INFINITE);
i2cReleaseBus(&I2CD1);
t_int = tmp75_rx_data[0] * 100;