/*! \brief TWI data interrupt handler. * * Calls the appropriate slave read or write handler. * * \param twi The TWI_Slave_t struct instance. */ void TWI_SlaveDataHandler(TWI_Slave_t *twi) { if (twi->interface->SLAVE.STATUS & TWI_SLAVE_DIR_bm) { TWI_SlaveWriteHandler(twi); } else { TWI_SlaveReadHandler(twi); } }
/*! \brief TWI data interrupt handler. * * Calls the appropriate slave read or write handler. * * \param twi The TWI_Slave_t struct instance. */ static void TWI_SlaveDataHandler(TWI_Slave_t *twi) { if (twic_status_reg & TWI_SLAVE_DIR_bm) { TWI_SlaveWriteHandler(twi); } else { TWI_SlaveReadHandler(twi); } }