From 1a47a218a486bffe0c8a9e1a29a15eef223611f5 Mon Sep 17 00:00:00 2001 From: Bogdan Marinescu Date: Mon, 12 Aug 2013 12:31:05 +0300 Subject: [PATCH] [KL25Z] Fixed counter type for i2c_read operations. --- .../mbed/targets/hal/TARGET_Freescale/TARGET_KL25Z/i2c_api.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KL25Z/i2c_api.c b/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KL25Z/i2c_api.c index aa41f7cd8a..602a8c725e 100644 --- a/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KL25Z/i2c_api.c +++ b/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KL25Z/i2c_api.c @@ -232,7 +232,7 @@ void i2c_frequency(i2c_t *obj, int hz) { } int i2c_read(i2c_t *obj, int address, char *data, int length, int stop) { - uint8_t count; + int count; char dummy_read, *ptr; if (i2c_start(obj)) { @@ -357,8 +357,9 @@ int i2c_slave_receive(i2c_t *obj) { } int i2c_slave_read(i2c_t *obj, char *data, int length) { - uint8_t dummy_read, count; + uint8_t dummy_read; uint8_t * ptr; + int count; // set rx mode obj->i2c->C1 &= ~I2C_C1_TX_MASK;