Beispiel #1
0
void i2c_int_handler() {
#ifdef I2CMASTER
    i2c_master_int_handler();
#else
    i2c_slave_int_handler();
#endif
}
Beispiel #2
0
void i2c_int_handler() {
    switch (i2c_mode){
        case I2C_MODE_MASTER: {
            i2c_master_int_handler();
            break;
        }
        case I2C_MODE_SLAVE: {
            i2c_slave_int_handler();
            break;
        }
        default: {
            // mode was not set, ERROR
            break;
        }
    }
}