-
Notifications
You must be signed in to change notification settings - Fork 7
stopClock
gicking edited this page Feb 6, 2018
·
2 revisions
back to Command Reference / Time
Selectively disables the interrupt used for time-keeping (1ms timer4 update). Can be re-enabled using startClock(). In contrast to command noInterrupts(), other interrupts are not affected (e.g. interrupt-driven communication).
The following functions require an enabled 1ms interrupt: delay(), delayMicroseconds(), millis(), micros(), flagMilli(), clearFlagMilli(), setTimeout(), checkTimeout()
- defined in
timer4.h
- auto-loaded in
main_general.h
- in
config.h
set#define USE_TIM4_UPD_ISR
to enable time-keeping via 1ms interrupt.
stopClock()
-
input:
- none
-
output:
- none
- Nothing
The below code disables the time-keeping interrupt, performs some time-critical code, and re-enable the interrupt afterwards.
#include "main_general.h" // board-independent main
void setup() {}
void loop()
{
stopClock();
// critical, time-sensitive code here
startClock();
// other code here
}
- tbd
-
Getting Started
-
- General Commands
- Libraries
- LCD BTHQ21605V
- poti AD5280
- poti AD5282
- freemodbus
- PetitFS SD-card (min)
- FatFS: SD card (full)
- Board Specific
-
- Universal
- Board Specific