status check

This commit is contained in:
rusefi 2018-09-10 22:24:50 -04:00
parent 4832d893ba
commit d25ba6a3ef
2 changed files with 4 additions and 0 deletions

View File

@ -60,6 +60,7 @@ static void waAnaWidthCallback(WaveReader *reader) {
efitick_t nowUs = getTimeNowUs();
reader->riseEventCounter++;
reader->lastActivityTimeUs = nowUs;
assertIsrContext(CUSTOM_ERR_6670);
addEngineSniffferEvent(reader->name, WC_UP);
uint32_t width = nowUs - reader->periodEventTimeUs;
@ -73,6 +74,7 @@ void WaveReader::onFallEvent() {
efitick_t nowUs = getTimeNowUs();
fallEventCounter++;
lastActivityTimeUs = nowUs;
assertIsrContext(CUSTOM_ERR_6670);
addEngineSniffferEvent(name, WC_DOWN);
efitick_t width = nowUs - widthEventTimeUs;

View File

@ -22,6 +22,8 @@
#define isLocked() (ch.dbg.lock_cnt > 0)
#define isIsrContext() (ch.dbg.isr_cnt > 0)
#define assertIsrContext(code) efiAssertVoid(code, isIsrContext(), "NOT_ISR")
#ifdef __cplusplus
extern "C"
{