Zitat Zitat von Searcher Beitrag anzeigen
Eine interessante Stelle ist die Verwendung von Interruptroutinen. Der Compiler rettet beim Aufruf meist mehr Register auf dem Stack als nötig.
das stimmt, das ist auch der Grund, weshalb manche Intr nicht mehr korrekt funktionieren, wenn man direkt die GPIOs manipuliert:
Code:
direct port manipulation compiles to 1 or 2 instructions, calling digitalRead is dozens.
One issue to be aware of is interrupts - some of the native direct-port manipulation code will not be
interrupt-safe, where as digitalRead/digitalWrite/pinMode() are carefully coded to work when used
both in an ISR and the main program.