From 384f40956c4292c33ec087e90f9dfa6da5383800 Mon Sep 17 00:00:00 2001 From: Yuri D'Elia Date: Sun, 27 Sep 2020 16:42:20 +0200 Subject: [PATCH] Remove obsolete cbi/sbi --- Firmware/twi.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Firmware/twi.c b/Firmware/twi.c index 11c708aa..f8c077ab 100644 --- a/Firmware/twi.c +++ b/Firmware/twi.c @@ -22,14 +22,6 @@ #include #include "Arduino.h" // for digitalWrite -#ifndef cbi -#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) -#endif - -#ifndef sbi -#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) -#endif - #include "twi.h" @@ -40,8 +32,7 @@ void twi_init(void) digitalWrite(SCL, 1); // initialize twi prescaler and bit rate - cbi(TWSR, TWPS0); - cbi(TWSR, TWPS1); + TWSR &= ~(_BV(TWPS0) | _BV(TWPS1)); TWBR = ((F_CPU / TWI_FREQ) - 16) / 2; /* twi bit rate formula from atmega128 manual pg 204