Atmel Software Framework

twis.c File Reference

 XMEGA TWI slave driver source file.
 This file contains the function implementations the XMEGA TWI slave
 driver.

 The driver is not intended for size and/or speed critical code, since
 most functions are just a few lines of code, and the function call
 overhead would decrease code performance. The driver is intended for
 rapid prototyping and documentation purposes for getting started with
 the XMEGA TWI slave module.

 For size and/or speed critical code, it is recommended to copy the
 function contents directly into your application instead of making
 a function call.

 Several functions use the following construct:
     "some_register = ... | (some_parameter ? SOME_BIT_bm : 0) | ..."
 Although the use of the ternary operator ( if ? then : else ) is
 discouraged, in some occasions the operator makes it possible to write
 pretty clean and neat code. In this driver, the construct is used to
 set or not set a configuration bit based on a boolean input parameter,
 such as the "some_parameter" in the example above.
Application note:
AVR1308: Using the XMEGA TWI
Documentation
For comprehensive code documentation, supported compilers, compiler settings and supported devices see readme.html

Atmel Corporation: http://www.atmel.com

Revision:
2660
Date:
2009-08-11 12:28:58 +0200 (Tue, 11 Aug 2009)


Copyright (c) 2014-2015 Atmel Corporation. All rights reserved.

#include "twis.h"

Functions

void TWI_SlaveAddressMatchHandler (TWI_Slave_t *twi)
 TWI address match interrupt handler. More...
 
void TWI_SlaveDataHandler (TWI_Slave_t *twi)
 TWI data interrupt handler. More...
 
void TWI_SlaveInitializeDriver (TWI_Slave_t *twi, TWI_t *module, void(*processDataFunction)(void))
 Initalizes TWI slave driver structure. More...
 
void TWI_SlaveInitializeModule (TWI_Slave_t *twi, uint8_t address, TWI_SLAVE_INTLVL_t intLevel)
 Initialize the TWI module. More...
 
void TWI_SlaveInterruptHandler (TWI_Slave_t *twi)
 Common TWI slave interrupt service routine. More...
 
void TWI_SlaveReadHandler (TWI_Slave_t *twi)
 TWI slave read interrupt handler. More...
 
void TWI_SlaveStopHandler (TWI_Slave_t *twi)
 TWI stop condition interrupt handler. More...
 
void TWI_SlaveTransactionFinished (TWI_Slave_t *twi, uint8_t result)
 TWI transaction finished function. More...
 
void TWI_SlaveWriteHandler (TWI_Slave_t *twi)
 TWI slave write interrupt handler. More...