FreeEMS  0.2.0-SNAPSHOT-282-g9efc524
Macros | Functions | Variables

Prevents main loop from running calculations and finishes quickly. More...

#include "../inc/freeEMS.h"
#include "../inc/interrupts.h"
#include "../inc/decoderInterface.h"
Include dependency graph for Listener.c:

Go to the source code of this file.

Macros

#define DECODER_IMPLEMENTATION_C
#define DECODER_MAX_CODE_TIME   666
#define NUMBER_OF_REAL_EVENTS   1
#define NUMBER_OF_VIRTUAL_EVENTS   1

Functions

void decoderInitPreliminary ()
void perDecoderReset ()
void PrimaryRPMISR ()
 RPM ISRs, IC timer for engine position and RPM.
void SecondaryRPMISR ()
 RPM ISRs, IC timer for engine position and RPM.

Variables

const unsigned short eventAngles [] = {0}
const unsigned char eventValidForCrankSync [] = {0}

Detailed Description

Prevents main loop from running calculations and finishes quickly.

The purpose of this "decoder" is purely to listen to the inputs and trick the rest of the code into not running any calculations and just sending as many logs as it can.

This is useful to get a smooth logic analyser or other high speed log free of gaps in the stream.

Definition in file Listener.c.

Macro Definition Documentation

#define DECODER_IMPLEMENTATION_C

Definition at line 43 of file Listener.c.

#define DECODER_MAX_CODE_TIME   666

Definition at line 44 of file Listener.c.

#define NUMBER_OF_REAL_EVENTS   1

Definition at line 45 of file Listener.c.

#define NUMBER_OF_VIRTUAL_EVENTS   1

Definition at line 46 of file Listener.c.

Function Documentation

void decoderInitPreliminary ( void  )
Todo:
TODO Perhaps use some of the space freed by shrinking all timing tables for this: /unsigned long wheelEventTimeStamps[numberOfWheelEvents]; // For logging wheel patterns as observed

Definition at line 52 of file Listener.c.

{} // This decoder works with the defaults
void perDecoderReset ( void  )

Definition at line 53 of file Listener.c.

{} // Nothing special to reset for this code
void PrimaryRPMISR ( void  )

RPM ISRs, IC timer for engine position and RPM.

There are multiple copies of this interrupt handler, each is linked with the rest of the code once such that if there are N decoder implementations and/or variants, then there are N loadable binaries produced after a full build.

For details on any specific decoder implementation, see the documentation for that specific file.

Definition at line 60 of file Listener.c.

References BIT0, Clocks, DEBUG_TURN_PIN_OFF, DEBUG_TURN_PIN_ON, DECODER_BENCHMARKS, KeyUserDebugs, NBIT0, PORTB, KeyUserDebug::primaryTeethSeen, TFLG, and Clock::timeoutADCreadingClock.

{
/* Clear the interrupt flag for this input compare channel */
TFLG = 0x01;
// Count the number of both negative and positive going pulses seen.
/* Reset the clock for reading timeout */
}
void SecondaryRPMISR ( void  )

RPM ISRs, IC timer for engine position and RPM.

There are multiple copies of this interrupt handler, each is linked with the rest of the code once such that if there are N decoder implementations and/or variants, then there are N loadable binaries produced after a full build.For details on any specific decoder implementation, see the documentation for that specific file.

Definition at line 73 of file Listener.c.

References BIT1, Clocks, DEBUG_TURN_PIN_OFF, DEBUG_TURN_PIN_ON, DECODER_BENCHMARKS, KeyUserDebugs, NBIT1, PORTB, KeyUserDebug::secondaryTeethSeen, TFLG, and Clock::timeoutADCreadingClock.

{
/* Clear the interrupt flag for this input compare channel */
TFLG = 0x02;
// Count the number of both negative and positive going pulses seen.
/* Reset the clock for reading timeout */
}

Variable Documentation

const unsigned short eventAngles[] = {0}

Definition at line 55 of file Listener.c.

const unsigned char eventValidForCrankSync[] = {0}

Definition at line 56 of file Listener.c.