9 years, 9 months ago.

I2CSlave class with LPCXpresso824-MAX board

Hello mbed users,

I'm working with LPCXpresso824-MAX board and

I'd like to configure I2C port as a slave.

However after I declared this class

  1. include "mbed.h"

I2CSlave slave(P0_11, P0_10);

The mbed Compiler did not recognize this class and outputs this message:

Error: Identifier "I2CSlave" is undefined in "main.cpp", Line: 15, Col: 2

The Compiler did recognize so far I2C class, DigitalOut and PwmOut.

So it looks like it's a mbed Compiler problem to me.

Any Suggestions would be highly appreciated.

Thanks.

Question relating to:

LPCXpresso824-MAX from NXP is an mbed enabled platform which combines the advantages of the mbed ecosystem and Arduino form factor.

1 Answer

9 years, 9 months ago.

Unfortunately the I2CSlave class is not yet supported on the LPC812 and LPC824. You see in this file that it is disabled.

I have pull request pending for I2CSlave on the LPC812. It should be possible to port that solution to LPC824 with little bit of tweaking.

Accepted Answer

Thanks Wim for your reply,

When do you think this I2CSlave class will be available ?

Best Regards.

posted by Elianco S 06 Feb 2015

Should not take too long. Martin Kojtal (mbed) needs to find some time for some changes in other platforms before the slave class can be activated. There is in fact already some slave code for the LPC824 but since it is disabled you cant use it. I think it was disabled because it is not working... I have a pretty good idea why it is wrong, but cant test because I dont have the platform myself. You could import the mbed library sourcecode in your project, make some changes and give it a go.

posted by Wim Huiskamp 06 Feb 2015