6 years, 6 months ago.

Comple error for I2CSlave in case of LPC800

When I comple the following program, errors occur for I2CSlave.

[Source Code]

  1. include "mbed.h"

I2CSlave slave(P0_10, P0_11); LPC800 I2CSlave slave(dp5, dp27); LPC1114 DigitalOut myled(LED1);

  1. define MY_ADR 0x10

int main() { int s, d;

slave.address(MY_ADR); while (1) { s = slave.receive(); if( s==I2CSlave::WriteAddressed ) { d = slave.read(); if( d!=0 ) myled = 1; else myled = 0; } } }

Error messages are as follows, Identifier "I2CSlave" is undefined ... Name followed by "::" must be a class or namespace name ...

However, if switched to LPC1114 as the target platform, error does not occur.

I don't understand why errors occur for LPC800.

Please let me know if there is a solution if.

Question relating to:

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

1 Answer

6 years, 6 months ago.

Sofar the I2C-Slave methods have not yet been implemented in the mbed libs for the LPC800. The LPC1114, LPC1768 are different devices for which the I2C-Slave libs are already available.

Accepted Answer