Omar Choudary <choudary.o...@gmail.com> wrote:

> Sorry for writing too early.

In that case, it makes sense to either write the value
directly:

  MCUCR = _BV(JTD);
  MCUCR = _BV(JTD);

(usually, you are expected to know the entire contents of that
register at this point ;-), or use a temporary variable rather than |=
directly on MCUCR:

  uint8_t tmpval = MCUCR;
  tmpval |= _BV(JTD);
  MCUCR = tmpval;
  MCUCR = tmpval;

The |= requests MCUCR to be read and written back each time (due to
its volatileness).
-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to