I was reading some code to use an on an arduino ATMEGA328P and I can't figure out what this line of code does.
ASSR &= ~(_BV(EXCLK) | _BV(AS2));
I know that ASSR is the Asynchronous status register and that EXCLK are AS2 are bits in that register. I'm pretty sure that _BV() is used to set that bit, correct me if I'm wrong. What I don't know is what this code actually does? It seems like that this code uses bitwise operations to compare the register ASSR to a single bit (
~(_BV(EXCLK) | _BV(AS2))) and then sets that register to a single bit, one or zero. This doesn't make any sense to me since this register is 7 bits large and can't be compared to a single bit. Any help is appreciated, thanks.