Skip to content

Commit

Permalink
Merge pull request #34 from Camble/master
Browse files Browse the repository at this point in the history
Add support for ATtiny167
  • Loading branch information
rambo authored Aug 20, 2017
2 parents f7a156c + 39b1ab7 commit 860ad85
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions TinyWireS/usiTwiSlave.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Change Activity:
12 Dev 2009 Added callback functions for data requests
06 Feb 2015 Minor change to allow mutli-byte requestFrom() from master.
10 Feb 2015 Simplied RX/TX buffer code and allowed use of full buffer.
12 Dec 2016 Added support for ATtiny167
********************************************************************************/

Expand All @@ -51,6 +52,19 @@ Change Activity:
device dependent defines
********************************************************************************/

#if defined( __AVR_ATtiny167__ )
# define DDR_USI DDRB
# define PORT_USI PORTB
# define PIN_USI PINB
# define PORT_USI_SDA PB0
# define PORT_USI_SCL PB2
# define PIN_USI_SDA PINB0
# define PIN_USI_SCL PINB2
# define USI_START_COND_INT USISIF
# define USI_START_VECTOR USI_START_vect
# define USI_OVERFLOW_VECTOR USI_OVERFLOW_vect
#endif

#if defined( __AVR_ATtiny2313__ )
# define DDR_USI DDRB
# define PORT_USI PORTB
Expand Down Expand Up @@ -107,8 +121,8 @@ Change Activity:
#endif

#if defined( __AVR_ATtiny261__ ) | \
defined( __AVR_ATtiny461__ ) | \
defined( __AVR_ATtiny861__ )
defined( __AVR_ATtiny461__ ) | \
defined( __AVR_ATtiny861__ )
# define DDR_USI DDRB
# define PORT_USI PORTB
# define PIN_USI PINB
Expand Down Expand Up @@ -444,8 +458,8 @@ uint8_t usiTwiAmountDataInReceiveBuffer(void)
{
return rxCount;
}




/********************************************************************************
Expand Down

0 comments on commit 860ad85

Please sign in to comment.