Skip to content

Commit

Permalink
Disable I2C interface for ATmega32P/ATmega3290P.
Browse files Browse the repository at this point in the history
Both of these lack a hardware TWI and only come with USI instead.
  • Loading branch information
CruzR committed Sep 12, 2016
1 parent 221d2c4 commit f552826
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions csrc/u8g_com_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ static void u8g_i2c_set_error(uint8_t code, uint8_t pos)
#if __AVR_ARCH__ == 25
#undef U8G_ATMEGA_HW_TWI
#endif

/* Some ATmegas also lack dedicated I2C hardware. */
#if defined(__AVR_ATmega329P__) || defined(__AVR_ATmega3290P__)
#undef U8G_ATMEGA_HW_TWI
#endif

#endif

#if defined(U8G_ATMEGA_HW_TWI)
Expand Down

0 comments on commit f552826

Please sign in to comment.