Speeduino
Loading...
Searching...
No Matches
Public Attributes | List of all members
decoder_t Struct Reference

This structure represents a decoder configuration. More...

#include <decoder_t.h>

Collaboration diagram for decoder_t:
Collaboration graph
[legend]

Public Attributes

interrupt_t primary
 The primary interrupt configuration - usually the crank trigger.
 
interrupt_t secondary
 The secondary interrupt configuration - usually the cam trigger.
 
interrupt_t tertiary
 The tertiary interrupt configuration - for decoders that use a 3rd input. E.g. VVT.
 
using getRPM_t = uint16_t(*)(void)
 The function to get the RPM.
 
getRPM_t getRPM
 The function to get the RPM.
 
using getCrankAngle_t = int16_t(*)(void)
 The function to get the crank angle.
 
getCrankAngle_t getCrankAngle
 The function to get the crank angle.
 
using setEndTeeth_t = void(*)(void)
 The function to set the end teeth for ignition calculations.
 
setEndTeeth_t setEndTeeth
 The function to set the end teeth for ignition calculations.
 
using reset_t = void(*)(void)
 The function to reset the decoder. Called when the engine is stopped, or when the engine is started.
 
reset_t reset
 The function to reset the decoder. Called when the engine is stopped, or when the engine is started.
 
using engine_running_t = bool(*)(uint32_t)
 The function to test if the engine is running.
 
engine_running_t isEngineRunning
 The function to test if the engine is running.
 
using status_fun_t = decoder_status_t(*)(void)
 The function to get the current decoder status.
 
status_fun_t getStatus
 The function to get the current decoder status.
 
using feature_fun_t = decoder_features_t(*)(void)
 The function to get the current decoder feature set.
 
feature_fun_t getFeatures
 The function to get the current decoder feature set.
 

Detailed Description

This structure represents a decoder configuration.

Create using decoder_builder_t

Member Typedef Documentation

◆ engine_running_t

The function to test if the engine is running.

This is based on whether or not the decoder has detected a tooth recently

Parameters
curTimeThe time in µS to use for the liveness check. Typically the result of a recent call to micros()
Returns
true If the engine is turning
false If the engine is not turning

◆ feature_fun_t

The function to get the current decoder feature set.

◆ getCrankAngle_t

The function to get the crank angle.

◆ getRPM_t

The function to get the RPM.

◆ reset_t

The function to reset the decoder. Called when the engine is stopped, or when the engine is started.

◆ setEndTeeth_t

The function to set the end teeth for ignition calculations.

◆ status_fun_t

The function to get the current decoder status.

Member Data Documentation

◆ getCrankAngle

getCrankAngle_t decoder_t::getCrankAngle

The function to get the crank angle.

◆ getFeatures

feature_fun_t decoder_t::getFeatures

The function to get the current decoder feature set.

◆ getRPM

getRPM_t decoder_t::getRPM

The function to get the RPM.

◆ getStatus

status_fun_t decoder_t::getStatus

The function to get the current decoder status.

◆ isEngineRunning

engine_running_t decoder_t::isEngineRunning

The function to test if the engine is running.

This is based on whether or not the decoder has detected a tooth recently

Parameters
curTimeThe time in µS to use for the liveness check. Typically the result of a recent call to micros()
Returns
true If the engine is turning
false If the engine is not turning

◆ primary

interrupt_t decoder_t::primary

The primary interrupt configuration - usually the crank trigger.

◆ reset

reset_t decoder_t::reset

The function to reset the decoder. Called when the engine is stopped, or when the engine is started.

◆ secondary

interrupt_t decoder_t::secondary

The secondary interrupt configuration - usually the cam trigger.

◆ setEndTeeth

setEndTeeth_t decoder_t::setEndTeeth

The function to set the end teeth for ignition calculations.

◆ tertiary

interrupt_t decoder_t::tertiary

The tertiary interrupt configuration - for decoders that use a 3rd input. E.g. VVT.


The documentation for this struct was generated from the following file: