night-howler / protogasm

Software and hardware for Arduino-based orgasm prediction / detection ... on protoboard!
117 stars 11 forks source link

is sbi and cbi deprecated? #8

Open mranderson02005 opened 2 years ago

mranderson02005 commented 2 years ago

In the code you have references to sbi and cbi, but that doesn't seem to work. I think they are deprecated perhaps? What would the correct code be instead?

thanks!

IggieBlackIce commented 2 years ago

They appear to be deprecated macros. I found this code that seems to do exactly what the macros did:

#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit));
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit));