AllJoyn/Samples/BACnetAdapter/bacnet-stack-0.8.2/ports/xplained/ASF/xmega/drivers/twi/twis.c
void TWI_SlaveInitializeDriver(TWI_Slave_t * twi,
    TWI_t * module,
    void (*processDataFunction) (void))
{
    twi->interface = module;
    twi->Process_Data = processDataFunction;
    twi->bytesReceived = 0;
    twi->bytesSent = 0;
    twi->status = TWIS_STATUS_READY;
    twi->result = TWIS_RESULT_UNKNOWN;
    twi->abort = false;
}
/*! \brief Initalizes TWI slave driver structure.
 *
 *  Initialize the instance of the TWI Slave and set the appropriate values.
 *
 *  \param twi                  The TWI_Slave_t struct instance.
 *  \param module               Pointer to the TWI module.
 *  \param processDataFunction  Pointer to the function that handles incoming data.
 */
\brief Initalizes TWI slave driver structure.
Initialize the instance of the TWI Slave and set the appropriate values.

\param twi                  The TWI_Slave_t struct instance.
\param module               Pointer to the TWI module.
\param processDataFunction  Pointer to the function that handles incoming data.
\ brief Initalizes TWI slave driver structure . Initialize the instance of the TWI Slave and set the appropriate values . \ param twi The TWI_Slave_t struct instance . \ param module Pointer to the TWI module . \ param processDataFunction Pointer to the function that handles incoming data .
void TWI_SlaveInitializeDriver(TWI_Slave_t * twi,
    TWI_t * module,
    void (*processDataFunction) (void))
{
    twi->interface = module;
    twi->Process_Data = processDataFunction;
    twi->bytesReceived = 0;
    twi->bytesSent = 0;
    twi->status = TWIS_STATUS_READY;
    twi->result = TWIS_RESULT_UNKNOWN;
    twi->abort = false;
}
void TWI_SlaveInitializeDriver ( TWI_Slave_t * twi , TWI_t * module , void ( * processDataFunction ) ( void ) ) { twi -> interface = module ; twi -> Process_Data = processDataFunction ; twi -> bytesReceived = 0 ; twi -> bytesSent = 0 ; twi -> status = TWIS_STATUS_READY ; twi -> result = TWIS_RESULT_UNKNOWN ; twi -> abort = false ; }
\brief Initalizes TWI slave driver structure.
\ brief Initalizes TWI slave driver structure .