main.cpp: comments edited

This commit is contained in:
Klaus K Wilting 2018-07-15 20:05:05 +02:00
parent 4b52478caa
commit 32d41c7c3c

View File

@ -336,14 +336,15 @@ void setup() {
// setup display refresh trigger IRQ using esp32 hardware timer // setup display refresh trigger IRQ using esp32 hardware timer
// https://techtutorialsx.com/2017/10/07/esp32-arduino-timer-interrupts/ // https://techtutorialsx.com/2017/10/07/esp32-arduino-timer-interrupts/
displaytimer = timerBegin(0, 80, true); // prescaler 80 -> divides 80 MHz CPU
// freq to 1 MHz, timer 0, count up // prescaler 80 -> divides 80 MHz CPU freq to 1 MHz, timer 0, count up
timerAttachInterrupt(displaytimer, &DisplayIRQ, displaytimer = timerBegin(0, 80, true);
true); // interrupt handler DisplayIRQ, triggered by edge // interrupt handler DisplayIRQ, triggered by edge
timerAlarmWrite( timerAttachInterrupt(displaytimer, &DisplayIRQ, true);
displaytimer, DISPLAYREFRESH_MS * 1000, // reload interrupt after each trigger of display refresh cycle
true); // reload interrupt after each trigger of display refresh cycle timerAlarmWrite(displaytimer, DISPLAYREFRESH_MS * 1000, true);
timerAlarmEnable(displaytimer); // enable display interrupt // enable display interrupt
timerAlarmEnable(displaytimer);
#endif #endif
// setup channel rotation trigger IRQ using esp32 hardware timer 1 // setup channel rotation trigger IRQ using esp32 hardware timer 1