Microchip® Advanced Software Framework

twis.c File Reference

TWIS driver for AVR32 UC3.

Copyright (c) 2009-2018 Microchip Technology Inc. and its subsidiaries.

#include <avr32/io.h>
#include "compiler.h"
#include "twis.h"
#include "status_codes.h"

Macros

#define AVR32_TWIS_SR_ERROR_MASK
 Define all error conditions. More...
 

Functions

 ISR (twis_slave_interrupt_handler, CONF_TWIS_IRQ_GROUP, CONF_TWIS_IRQ_LEVEL)
 TWIS interrupt handler. More...
 
void twis_send_data_ack (volatile avr32_twis_t *twis)
 Enable ACK transfer in Slave Receiver Mode. More...
 
void twis_send_data_nack (volatile avr32_twis_t *twis, bool stop_callback)
 Enable NACK transfer in Slave Receive Mode. More...
 
status_code_t twis_slave_init (volatile avr32_twis_t *twis, const twis_options_t *opt, const twis_slave_fct_t *slave_fct)
 Initialize the TWI Slave Module. More...
 

Variables

static volatile avr32_twis_t * twis_inst_slave
 Pointer to the TWIS instance physical address. More...
 
static twis_slave_fct_t twis_slave_fct
 Pointer on TWI slave application routines. More...
 

#define AVR32_TWIS_SR_ERROR_MASK
Value:
(AVR32_TWIS_SR_BUSERR_MASK \
| AVR32_TWIS_SR_SMBPECERR_MASK \
| AVR32_TWIS_SR_SMBTOUT_MASK \
| AVR32_TWIS_SR_ORUN_MASK \
| AVR32_TWIS_SR_URUN_MASK)

Define all error conditions.

Referenced by ISR().

ISR ( twis_slave_interrupt_handler  ,
CONF_TWIS_IRQ_GROUP  ,
CONF_TWIS_IRQ_LEVEL   
)

volatile avr32_twis_t* twis_inst_slave
static

Pointer to the TWIS instance physical address.

Referenced by ISR(), and twis_slave_init().

twis_slave_fct_t twis_slave_fct
static

Pointer on TWI slave application routines.