diff --git a/i2c.c b/i2c.c index 133ff97..ea08c04 100644 --- a/i2c.c +++ b/i2c.c @@ -59,12 +59,8 @@ uint8_t i2c_byte_count; uint8_t *i2c_buffer; #endif /* I2C_SLAVE_MODE */ -I2C_HANDLER i2c_master_func = &i2c_do_nothing; -I2C_HANDLER i2c_slave_func = &i2c_do_nothing; -I2C_HANDLER i2c_error_func = &i2c_do_nothing; - -void i2c_init(uint8_t address, I2C_HANDLER func) { +void i2c_init(uint8_t address) { i2c_address = address; @@ -74,8 +70,6 @@ void i2c_init(uint8_t address, I2C_HANDLER func) { I2C_PORT |= (1 << I2C_SCL_PIN) | (1 << I2C_SDA_PIN); #endif /* I2C_ENABLE_PULLUPS */ - i2c_master_func = func; - /** TWI Bit Rate register SCL_freq = CPU_freq / (16 + 2 * TWBR) @@ -92,7 +86,6 @@ void i2c_init(uint8_t address, I2C_HANDLER func) { #endif /* I2C_MASTER_MODE */ #ifdef I2C_SLAVE_MODE - i2c_slave_func = func; TWAR = i2c_address; // We listen to broadcasts if lowest bit is set. TWCR = (0<