I2CSlave test program. I2CSlave library has some improper behavior, so this program is able to watch that. The workaround for this behavior, only for NXP device, is wrote in 'I2CSlave_mod_NXP.cpp'.

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers I2CSlave_mod_NXP.h Source File

I2CSlave_mod_NXP.h

00001 #ifndef I2C_SLAVE_NXP_MOD_H
00002 #define I2C_SLAVE_NXP_MOD_H
00003 
00004 #include "mbed.h"
00005 
00006 class I2CSlave_mod : public I2CSlave {
00007 public:
00008     I2CSlave_mod(PinName sda, PinName scl);
00009     int read(char *data, int length);       // hiding read function of parent class
00010 
00011 protected:
00012     int i2c_slave_read_mod(i2c_t *obj, char *data, int length);
00013 };
00014 
00015 #endif