twi_drv.h File Reference

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

Go to the source code of this file.

Defines

#define Disable_twi_interrupt()   (TWCR &= ~MSK_TWCR_TWIE)
#define Enable_twi_interrupt()   (TWCR |= MSK_TWCR_TWIE)
#define MSK_TWCR_TWEA   0x40
#define MSK_TWCR_TWEN   0x04
#define MSK_TWCR_TWIE   0x01
#define MSK_TWCR_TWINT   0x80
#define MSK_TWCR_TWSTA   0x20
#define MSK_TWCR_TWSTO   0x10
#define TWI_BIG_FRAME
#define Twi_clear_aa()   (TWCR &= (~MSK_TWCR_TWEA)&(~MSK_TWCR_TWINT))
#define Twi_clear_si()   (TWCR |= MSK_TWCR_TWINT)
#define Twi_clear_start()   (TWCR &= (~MSK_TWCR_TWSTA)&(~MSK_TWCR_TWINT) )
#define Twi_clear_stop()   (TWCR &= ~MSK_TWCR_TWSTO)
#define Twi_get_address()   (TWAR)
#define Twi_get_data()   (TWDR)
#define Twi_get_status()   (TWSR)
#define Twi_init_hw(arg)   (TWCR = arg)
#define Twi_repeated_start()   (TWCR |= 0xA4)
#define Twi_set_aa()   (TWCR |= MSK_TWCR_TWEA&(~MSK_TWCR_TWINT))
#define Twi_set_address(address)   (TWAR = address)
#define Twi_set_baudrate(baudrate)   (TWBR = baudrate)
#define Twi_set_data(data)   (TWDR = data)
#define Twi_set_start()   (TWCR |= MSK_TWCR_TWSTA)
#define Twi_set_stop()   (TWCR |= MSK_TWCR_TWSTO)
#define Twi_wait_event()   while(((TWCR & MSK_TWCR_TWINT))!= MSK_TWCR_TWINT)
#define Twi_wait_hw_stop()   while((TWCR & MSK_TWCR_TWSTO)==MSK_TWCR_TWSTO)


Define Documentation

 
#define Disable_twi_interrupt (  )     (TWCR &= ~MSK_TWCR_TWIE)

Definition at line 40 of file twi_drv.h.

Referenced by twi_send_message_polling().

 
#define Enable_twi_interrupt (  )     (TWCR |= MSK_TWCR_TWIE)

Definition at line 41 of file twi_drv.h.

Referenced by twi_send_message_interrupt(), and twi_slave_interrupt().

#define MSK_TWCR_TWEA   0x40

Definition at line 18 of file twi_drv.h.

#define MSK_TWCR_TWEN   0x04

Definition at line 21 of file twi_drv.h.

#define MSK_TWCR_TWIE   0x01

Definition at line 22 of file twi_drv.h.

#define MSK_TWCR_TWINT   0x80

Definition at line 17 of file twi_drv.h.

#define MSK_TWCR_TWSTA   0x20

Definition at line 19 of file twi_drv.h.

#define MSK_TWCR_TWSTO   0x10

Definition at line 20 of file twi_drv.h.

#define TWI_BIG_FRAME

Definition at line 48 of file twi_drv.h.

 
#define Twi_clear_aa (  )     (TWCR &= (~MSK_TWCR_TWEA)&(~MSK_TWCR_TWINT))

Definition at line 29 of file twi_drv.h.

Referenced by twi_decode_status(), and twi_getchar().

 
#define Twi_clear_si (  )     (TWCR |= MSK_TWCR_TWINT)

Definition at line 36 of file twi_drv.h.

Referenced by twi_decode_status(), twi_getchar(), twi_putchar(), and twi_slave_polling().

 
#define Twi_clear_start (  )     (TWCR &= (~MSK_TWCR_TWSTA)&(~MSK_TWCR_TWINT) )

Definition at line 31 of file twi_drv.h.

Referenced by twi_decode_status(), twi_getchar(), and twi_putchar().

 
#define Twi_clear_stop (  )     (TWCR &= ~MSK_TWCR_TWSTO)

Definition at line 34 of file twi_drv.h.

 
#define Twi_get_address (  )     (TWAR)

Definition at line 26 of file twi_drv.h.

 
#define Twi_get_data (  )     (TWDR)

Definition at line 35 of file twi_drv.h.

Referenced by twi_decode_status(), and twi_getchar().

 
#define Twi_get_status (  )     (TWSR)

Definition at line 30 of file twi_drv.h.

Referenced by twi_decode_status(), twi_getchar(), and twi_putchar().

#define Twi_init_hw ( arg   )     (TWCR = arg)

Definition at line 42 of file twi_drv.h.

Referenced by twi_lib_init().

 
#define Twi_repeated_start (  )     (TWCR |= 0xA4)

Definition at line 45 of file twi_drv.h.

Referenced by twi_decode_status().

 
#define Twi_set_aa (  )     (TWCR |= MSK_TWCR_TWEA&(~MSK_TWCR_TWINT))

Definition at line 28 of file twi_drv.h.

Referenced by twi_decode_status(), twi_getchar(), and twi_putchar().

#define Twi_set_address ( address   )     (TWAR = address)

Definition at line 25 of file twi_drv.h.

#define Twi_set_baudrate ( baudrate   )     (TWBR = baudrate)

Definition at line 37 of file twi_drv.h.

Referenced by twi_lib_init().

#define Twi_set_data ( data   )     (TWDR = data)

Definition at line 27 of file twi_drv.h.

Referenced by twi_decode_status(), twi_getchar(), and twi_putchar().

 
#define Twi_set_start (  )     (TWCR |= MSK_TWCR_TWSTA)

Definition at line 32 of file twi_drv.h.

Referenced by twi_decode_status(), twi_getchar(), twi_putchar(), twi_send_message_interrupt(), and twi_send_message_polling().

 
#define Twi_set_stop (  )     (TWCR |= MSK_TWCR_TWSTO)

Definition at line 33 of file twi_drv.h.

Referenced by twi_decode_status(), twi_getchar(), twi_putchar(), twi_send_message_interrupt(), and twi_send_message_polling().

 
#define Twi_wait_event (  )     while(((TWCR & MSK_TWCR_TWINT))!= MSK_TWCR_TWINT)

Definition at line 39 of file twi_drv.h.

Referenced by twi_getchar(), twi_putchar(), twi_send_message_polling(), and twi_slave_polling().

 
#define Twi_wait_hw_stop (  )     while((TWCR & MSK_TWCR_TWSTO)==MSK_TWCR_TWSTO)

Definition at line 38 of file twi_drv.h.

Referenced by twi_getchar(), twi_putchar(), twi_send_message_interrupt(), and twi_send_message_polling().


Generated on Mon Dec 1 11:12:22 2008 for AVR498 : Atmel BLDC control on ATAVRMC301 with ATtiny861 by  doxygen 1.5.4