I am getting this error code when trying to compile my project:
undefined reference to `i2c_slave_init'
I have i2c_slave.h in my project:
#include <i2c_slave.h>
When I look inside i2c_slave.h I see:
void i2c_slave_init(i2c_inst_t *i2c, uint8_t address, i2c_slave_handler_t handler);
As an experiment, I commented out #include <i2c_slave.h>. When I do so I get errors for undefined references to the enums I am using which are also found in i2c_slave.h:
typedef enum i2c_slave_event_t
{
I2C_SLAVE_RECEIVE,
I2C_SLAVE_REQUEST,
I2C_SLAVE_FINISH,
} i2c_slave_event_t;
So I know the linker is in fact finding i2c_slave.h or else I would receive all of these errors with i2c_slave.h included.
Any guidance would be much appreciated.