Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

USI_TWI_Master.h File Reference


Detailed Description

Atmel Corporation

Revision
1.3
Date
Monday, October 10, 2005 13:23:34 UTC

Definition in file USI_TWI_Master.h.

#include <iotiny24.h>

Include dependency graph for USI_TWI_Master.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  tx_type

Defines

#define DDR_USI   DDRA
#define FALSE   0
#define OWN_ADR   60
#define PIN_USI   PINA
#define PIN_USI_SCL   PINA4
#define PIN_USI_SDA   PINA6
#define PORT_USI   PORTA
#define PORT_USI_SCL   PORTA4
#define PORT_USI_SDA   PORTA6
#define R   1
#define SUCCESS   0xFF
#define SYS_CLK   1000.0
#define T2_TWI   ((SYS_CLK *4700) /1000000) +1
#define T4_TWI   ((SYS_CLK *4000) /1000000) +1
#define TRUE   1
#define TWI_ADR_BITS   1
#define TWI_NACK_BIT   0
#define TWI_READ_BIT   0
#define USI_TWI_DATA_OUT_OF_BOUND   0x01
#define USI_TWI_MISSING_START_CON   0x07
#define USI_TWI_MISSING_STOP_CON   0x08
#define USI_TWI_NO_ACK_ON_ADDRESS   0x06
#define USI_TWI_NO_ACK_ON_DATA   0x05
#define USI_TWI_NO_DATA   0x00
#define USI_TWI_UE_DATA_COL   0x04
#define USI_TWI_UE_START_CON   0x02
#define USI_TWI_UE_STOP_CON   0x03
#define W   0

Functions

__interrupt void USI_START_ISR (void)
unsigned char USI_TWI_Get_State_Info (void)
unsigned char USI_TWI_LCD_Test (void)
void USI_TWI_Master_Initialise (void)
unsigned char USI_TWI_Start_Transceiver_With_Data (unsigned char *, unsigned char)


Define Documentation

#define DDR_USI   DDRA
 

Definition at line 83 of file USI_TWI_Master.h.

Referenced by USI_TWI_LCD_Test(), USI_TWI_Master_Initialise(), USI_TWI_Master_Transfer(), and USI_TWI_Start_Transceiver_With_Data().

#define FALSE   0
 

Definition at line 92 of file USI_TWI_Master.h.

Referenced by LCD_Init(), LCD_PutXY_Raw(), LCD_WriteLine(), USI_TWI_LCD_Test(), USI_TWI_Master_Stop(), and USI_TWI_Start_Transceiver_With_Data().

#define OWN_ADR   60
 

Definition at line 65 of file USI_TWI_Master.h.

#define PIN_USI   PINA
 

Definition at line 85 of file USI_TWI_Master.h.

Referenced by USI_TWI_Master_Stop(), and USI_TWI_Master_Transfer().

#define PIN_USI_SCL   PINA4
 

Definition at line 89 of file USI_TWI_Master.h.

Referenced by USI_TWI_LCD_Test(), USI_TWI_Master_Initialise(), USI_TWI_Master_Stop(), USI_TWI_Master_Transfer(), and USI_TWI_Start_Transceiver_With_Data().

#define PIN_USI_SDA   PINA6
 

Definition at line 88 of file USI_TWI_Master.h.

Referenced by USI_TWI_LCD_Test(), USI_TWI_Master_Initialise(), USI_TWI_Master_Stop(), USI_TWI_Master_Transfer(), and USI_TWI_Start_Transceiver_With_Data().

#define PORT_USI   PORTA
 

Definition at line 84 of file USI_TWI_Master.h.

Referenced by USI_TWI_LCD_Test(), USI_TWI_Master_Initialise(), USI_TWI_Master_Stop(), and USI_TWI_Start_Transceiver_With_Data().

#define PORT_USI_SCL   PORTA4
 

Definition at line 87 of file USI_TWI_Master.h.

#define PORT_USI_SDA   PORTA6
 

Definition at line 86 of file USI_TWI_Master.h.

#define R   1
 

Definition at line 64 of file USI_TWI_Master.h.

#define SUCCESS   0xFF
 

Definition at line 66 of file USI_TWI_Master.h.

#define SYS_CLK   1000.0
 

Definition at line 40 of file USI_TWI_Master.h.

#define T2_TWI   ((SYS_CLK *4700) /1000000) +1
 

Definition at line 47 of file USI_TWI_Master.h.

Referenced by USI_TWI_LCD_Test(), USI_TWI_Master_Stop(), USI_TWI_Master_Transfer(), and USI_TWI_Start_Transceiver_With_Data().

#define T4_TWI   ((SYS_CLK *4000) /1000000) +1
 

Definition at line 48 of file USI_TWI_Master.h.

Referenced by USI_TWI_LCD_Test(), USI_TWI_Master_Stop(), USI_TWI_Master_Transfer(), and USI_TWI_Start_Transceiver_With_Data().

#define TRUE   1
 

Definition at line 91 of file USI_TWI_Master.h.

Referenced by USI_TWI_LCD_Test(), USI_TWI_Master_Stop(), and USI_TWI_Start_Transceiver_With_Data().

#define TWI_ADR_BITS   1
 

Definition at line 69 of file USI_TWI_Master.h.

#define TWI_NACK_BIT   0
 

Definition at line 70 of file USI_TWI_Master.h.

Referenced by USI_TWI_LCD_Test(), and USI_TWI_Start_Transceiver_With_Data().

#define TWI_READ_BIT   0
 

Definition at line 68 of file USI_TWI_Master.h.

Referenced by LCD_Init(), LCD_PutXY_Raw(), LCD_WriteLine(), USI_TWI_LCD_Test(), and USI_TWI_Start_Transceiver_With_Data().

#define USI_TWI_DATA_OUT_OF_BOUND   0x01
 

Definition at line 73 of file USI_TWI_Master.h.

Referenced by USI_TWI_Start_Transceiver_With_Data().

#define USI_TWI_MISSING_START_CON   0x07
 

Definition at line 79 of file USI_TWI_Master.h.

Referenced by USI_TWI_Start_Transceiver_With_Data().

#define USI_TWI_MISSING_STOP_CON   0x08
 

Definition at line 80 of file USI_TWI_Master.h.

Referenced by USI_TWI_Master_Stop().

#define USI_TWI_NO_ACK_ON_ADDRESS   0x06
 

Definition at line 78 of file USI_TWI_Master.h.

Referenced by USI_TWI_LCD_Test(), and USI_TWI_Start_Transceiver_With_Data().

#define USI_TWI_NO_ACK_ON_DATA   0x05
 

Definition at line 77 of file USI_TWI_Master.h.

Referenced by USI_TWI_LCD_Test(), and USI_TWI_Start_Transceiver_With_Data().

#define USI_TWI_NO_DATA   0x00
 

Definition at line 72 of file USI_TWI_Master.h.

Referenced by USI_TWI_Start_Transceiver_With_Data().

#define USI_TWI_UE_DATA_COL   0x04
 

Definition at line 76 of file USI_TWI_Master.h.

Referenced by USI_TWI_Start_Transceiver_With_Data().

#define USI_TWI_UE_START_CON   0x02
 

Definition at line 74 of file USI_TWI_Master.h.

Referenced by USI_TWI_Start_Transceiver_With_Data().

#define USI_TWI_UE_STOP_CON   0x03
 

Definition at line 75 of file USI_TWI_Master.h.

Referenced by USI_TWI_Start_Transceiver_With_Data().

#define W   0
 

Definition at line 63 of file USI_TWI_Master.h.


Function Documentation

__interrupt void USI_START_ISR void   ) 
 

Definition at line 51 of file USI_TWI_Master.c.

unsigned char USI_TWI_Get_State_Info void   ) 
 

Definition at line 82 of file USI_TWI_Master.c.

References USI_TWI_state.

unsigned char USI_TWI_LCD_Test void   ) 
 

Definition at line 218 of file USI_TWI_Master.c.

References DDR_USI, FALSE, PIN_USI_SCL, PIN_USI_SDA, PORT_USI, T2_TWI, T4_TWI, TRUE, TWI_NACK_BIT, TWI_READ_BIT, USI_TWI_Master_Stop(), USI_TWI_Master_Transfer(), USI_TWI_NO_ACK_ON_ADDRESS, USI_TWI_NO_ACK_ON_DATA, and USI_TWI_state.

void USI_TWI_Master_Initialise void   ) 
 

Definition at line 59 of file USI_TWI_Master.c.

References DDR_USI, PIN_USI_SCL, PIN_USI_SDA, and PORT_USI.

Referenced by Initialise().

unsigned char USI_TWI_Start_Transceiver_With_Data unsigned char *  ,
unsigned  char
 

Definition at line 100 of file USI_TWI_Master.c.

References DDR_USI, FALSE, PIN_USI_SCL, PIN_USI_SDA, PORT_USI, T2_TWI, T4_TWI, TRUE, TWI_NACK_BIT, TWI_READ_BIT, USI_TWI_DATA_OUT_OF_BOUND, USI_TWI_Master_Stop(), USI_TWI_Master_Transfer(), USI_TWI_MISSING_START_CON, USI_TWI_NO_ACK_ON_ADDRESS, USI_TWI_NO_ACK_ON_DATA, USI_TWI_NO_DATA, USI_TWI_state, USI_TWI_UE_DATA_COL, USI_TWI_UE_START_CON, and USI_TWI_UE_STOP_CON.

Referenced by LCD_Init(), LCD_PutXY_Raw(), and LCD_WriteLine().


Generated on Mon Oct 10 15:25:11 2005 for AVR245: Code Lock with 4x4 Keypad and I2C(TM) LCD by  doxygen 1.4.4