Microchip® Advanced Software Framework

atmega128rfa1_avr477_target/twi_master.c File Reference
#include <avr/io.h>
#include <avr/interrupt.h>
#include "qdebug_transport.h"
#include "twi_master.h"

Functions

 switch (TWSR)
 
void twi_master_init (void)
 Call this function to set up the TWI master to its initial standby state. More...
 
void twi_retrieve_message (void)
 To Receive data over TWI. More...
 
void twi_send_message (void)
 To Transmit data over TWI. More...
 
unsigned char twi_transceiver_busy (void)
 Call this function to test if the TWI_ISR is busy transmitting. More...
 

Variables

volatile unsigned char FrameInProgress
 This Interrupt Service Routine (ISR)is called when the TWI interrupt is triggered; Whenever a TWI event has occurred. More...
 
static unsigned char TWI_addr
 
static unsigned int TWI_msgSize
 
union TWI_statusReg TWI_statusReg = {0}
 

void twi_master_init ( void  )

Call this function to set up the TWI master to its initial standby state.

Remember to enable interrupts from the main application after initializing the TWI.

References TWI_BAUDSETTING.

Referenced by main(), run_twi_master_recv_test(), run_twi_master_send_test(), and twi_master_setup().

void twi_retrieve_message ( void  )
void twi_send_message ( void  )
unsigned char twi_transceiver_busy ( void  )

volatile unsigned char FrameInProgress
Initial value:
{
static unsigned int TWI_bufPtr

This Interrupt Service Routine (ISR)is called when the TWI interrupt is triggered; Whenever a TWI event has occurred.

TWINT is not cleared automatically, but must be cleared manually in the ISR.

Referenced by BitBangSPI_Send_Message().

unsigned char TWI_addr
static
unsigned int TWI_msgSize
static