Skip to content

Commit 83d8714

Browse files
committed
Update I2CSlave.cpp
Added comments regarding the need for dedicated i2c_slave_byte_write() and i2c_slave_byte_read() functions.
1 parent 5356a00 commit 83d8714

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

libraries/mbed/common/I2CSlave.cpp

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,8 @@ int I2CSlave::read(void) {
4646
// The dedicated I2C Slave byte read and byte write functions need to be called
4747
// from 'common' mbed I2CSlave API for devices that have separate Master and
4848
// Slave engines such as the lpc812 and lpc1549.
49-
//
50-
//#if defined (TARGET_LPC812) || defined (TARGET_LPC824) || defined (TARGET_LPC1549)
51-
#if defined (TARGET_LPC812)
52-
return i2c_slave_byte_read(&_i2c, 0);
53-
#else
49+
// return i2c_slave_byte_read(&_i2c, 0);
5450
return i2c_byte_read(&_i2c, 0);
55-
#endif
5651
}
5752

5853
int I2CSlave::write(const char *data, int length) {
@@ -64,12 +59,8 @@ int I2CSlave::write(int data) {
6459
// from 'common' mbed I2CSlave API for devices that have separate Master and
6560
// Slave engines such as the lpc812 and lpc1549.
6661
//
67-
//#if defined (TARGET_LPC812) || defined (TARGET_LPC824) || defined (TARGET_LPC1549)
68-
#if defined (TARGET_LPC812)
69-
return i2c_slave_byte_write(&_i2c, data);
70-
#else
62+
// return i2c_slave_byte_write(&_i2c, data);
7163
return i2c_byte_write(&_i2c, data);
72-
#endif
7364
}
7465

7566
void I2CSlave::stop(void) {

0 commit comments

Comments
 (0)