Confused by "if" statement in bootloader
hello,
still learning. trying understand bootloader code. understand registers are, don't understand going on in "if" statement. comparing value of 2 bytes, if equal returns true?
ch = mcusr;
mcusr = 0;
if ((ch & _bv(wdrf))) app_start();
thanks,
-ren
still learning. trying understand bootloader code. understand registers are, don't understand going on in "if" statement. comparing value of 2 bytes, if equal returns true?
ch = mcusr;
mcusr = 0;
if ((ch & _bv(wdrf))) app_start();
thanks,
-ren
no, "bitwise and" operator ("&"), typically used isolate particular bit of register. in case, can read whole segment "if wdrf bit in mcusr register non-zero, start application."
Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > Confused by "if" statement in bootloader
arduino
Comments
Post a Comment