PeterBLITZ / m2tklib

Automatically exported from code.google.com/p/m2tklib
0 stars 0 forks source link

set key problem with C99 mode of Arduino IDE #15

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
/home/kraus/prg/arduino-0022/libraries/M2tklib/utility/m2key.c: In Funktion 
»m2_GetKeyFromQueue«:
/home/kraus/prg/arduino-0022/libraries/M2tklib/utility/m2key.c:35: Fehler: 
»for« loop initial declaration used outside C99 mode

Original issue reported on code.google.com by olikr...@gmail.com on 16 Jul 2011 at 10:47

GoogleCodeExporter commented 8 years ago
replace atomic blocks with this code (which should work in none-C99 mode)

disable:
uint8_t status_reg = SREG;
cli();

restore:
SREG = status_reg;

Original comment by olikr...@gmail.com on 16 Jul 2011 at 12:33

GoogleCodeExporter commented 8 years ago
done
checked, that the interrupts are still working..

Original comment by olikr...@gmail.com on 16 Jul 2011 at 1:11