Speeduino
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
statuses.h File Reference

The statuses struct and related defines. More...

#include <stdint.h>
#include <SimplyAtomic.h>
#include "bit_manip.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  statuses
 The status struct with current values for all 'live' variables. More...
 

Macros

#define BIT_ENGINE_RUN   0
 
#define BIT_ENGINE_CRANK   1
 
#define BIT_ENGINE_ASE   2
 
#define BIT_ENGINE_WARMUP   3
 
#define BIT_ENGINE_ACC   4
 
#define BIT_ENGINE_DCC   5
 
#define BIT_ENGINE_MAPACC   6
 
#define BIT_ENGINE_MAPDCC   7
 
#define BIT_STATUS1_INJ1   0
 
#define BIT_STATUS1_INJ2   1
 
#define BIT_STATUS1_INJ3   2
 
#define BIT_STATUS1_INJ4   3
 
#define BIT_STATUS1_DFCO   4
 
#define BIT_STATUS1_BOOSTCUT   5
 
#define BIT_STATUS1_TOOTHLOG1READY   6
 
#define BIT_STATUS1_TOOTHLOG2READY   7
 
#define BIT_STATUS2_HLAUNCH   0
 
#define BIT_STATUS2_SLAUNCH   1
 
#define BIT_STATUS2_HRDLIM   2
 
#define BIT_STATUS2_SFTLIM   3
 
#define BIT_STATUS2_BOOSTCUT   4
 
#define BIT_STATUS2_ERROR   5
 
#define BIT_STATUS2_IDLE   6
 
#define BIT_STATUS2_SYNC   7
 
#define BIT_STATUS3_RESET_PREVENT   0
 
#define BIT_STATUS3_NITROUS   1
 
#define BIT_STATUS3_FUEL2_ACTIVE   2
 
#define BIT_STATUS3_VSS_REFRESH   3
 
#define BIT_STATUS3_HALFSYNC   4
 
#define BIT_STATUS3_NSQUIRTS1   5
 
#define BIT_STATUS3_UNUSED1   6
 
#define BIT_STATUS3_UNUSED2   7
 
#define BIT_STATUS4_WMI_EMPTY   0
 
#define BIT_STATUS4_VVT1_ERROR   1
 
#define BIT_STATUS4_VVT2_ERROR   2
 
#define BIT_STATUS4_FAN   3
 
#define BIT_STATUS4_BURNPENDING   4
 
#define BIT_STATUS4_STAGING_ACTIVE   5
 
#define BIT_STATUS4_COMMS_COMPAT   6
 
#define BIT_STATUS4_ALLOW_LEGACY_COMMS   7
 
#define BIT_STATUS5_FLATSH   0
 
#define BIT_STATUS5_FLATSS   1
 
#define BIT_STATUS5_SPARK2_ACTIVE   2
 
#define BIT_STATUS5_KNOCK_ACTIVE   3
 
#define BIT_STATUS5_KNOCK_PULSE   4
 
#define BIT_STATUS5_UNUSED6   5
 
#define BIT_STATUS5_UNUSED7   6
 
#define BIT_STATUS5_UNUSED8   7
 
#define BIT_AIRCON_REQUEST   0
 
#define BIT_AIRCON_COMPRESSOR   1
 
#define BIT_AIRCON_RPM_LOCKOUT   2
 
#define BIT_AIRCON_TPS_LOCKOUT   3
 
#define BIT_AIRCON_TURNING_ON   4
 
#define BIT_AIRCON_CLT_LOCKOUT   5
 
#define BIT_AIRCON_FAN   6
 
#define BIT_AIRCON_UNUSED8   7
 
#define ENGINE_PROTECT_BIT_RPM   0
 
#define ENGINE_PROTECT_BIT_MAP   1
 
#define ENGINE_PROTECT_BIT_OIL   2
 
#define ENGINE_PROTECT_BIT_AFR   3
 
#define ENGINE_PROTECT_BIT_COOLANT   4
 

Typedefs

using byte = uint8_t
 

Functions

static bool HasAnySyncUnsafe (const statuses &status)
 Non-atomic version of HasAnySync. **Should only be called in an ATOMIC() block***.
 
static bool HasAnySync (const statuses &status)
 

Detailed Description

The statuses struct and related defines.

Macro Definition Documentation

◆ BIT_AIRCON_CLT_LOCKOUT

#define BIT_AIRCON_CLT_LOCKOUT   5

◆ BIT_AIRCON_COMPRESSOR

#define BIT_AIRCON_COMPRESSOR   1

◆ BIT_AIRCON_FAN

#define BIT_AIRCON_FAN   6

◆ BIT_AIRCON_REQUEST

#define BIT_AIRCON_REQUEST   0

◆ BIT_AIRCON_RPM_LOCKOUT

#define BIT_AIRCON_RPM_LOCKOUT   2

◆ BIT_AIRCON_TPS_LOCKOUT

#define BIT_AIRCON_TPS_LOCKOUT   3

◆ BIT_AIRCON_TURNING_ON

#define BIT_AIRCON_TURNING_ON   4

◆ BIT_AIRCON_UNUSED8

#define BIT_AIRCON_UNUSED8   7

◆ BIT_ENGINE_ACC

#define BIT_ENGINE_ACC   4

◆ BIT_ENGINE_ASE

#define BIT_ENGINE_ASE   2

◆ BIT_ENGINE_CRANK

#define BIT_ENGINE_CRANK   1

◆ BIT_ENGINE_DCC

#define BIT_ENGINE_DCC   5

◆ BIT_ENGINE_MAPACC

#define BIT_ENGINE_MAPACC   6

◆ BIT_ENGINE_MAPDCC

#define BIT_ENGINE_MAPDCC   7

◆ BIT_ENGINE_RUN

#define BIT_ENGINE_RUN   0

◆ BIT_ENGINE_WARMUP

#define BIT_ENGINE_WARMUP   3

◆ BIT_STATUS1_BOOSTCUT

#define BIT_STATUS1_BOOSTCUT   5

◆ BIT_STATUS1_DFCO

#define BIT_STATUS1_DFCO   4

◆ BIT_STATUS1_INJ1

#define BIT_STATUS1_INJ1   0

◆ BIT_STATUS1_INJ2

#define BIT_STATUS1_INJ2   1

◆ BIT_STATUS1_INJ3

#define BIT_STATUS1_INJ3   2

◆ BIT_STATUS1_INJ4

#define BIT_STATUS1_INJ4   3

◆ BIT_STATUS1_TOOTHLOG1READY

#define BIT_STATUS1_TOOTHLOG1READY   6

◆ BIT_STATUS1_TOOTHLOG2READY

#define BIT_STATUS1_TOOTHLOG2READY   7

◆ BIT_STATUS2_BOOSTCUT

#define BIT_STATUS2_BOOSTCUT   4

◆ BIT_STATUS2_ERROR

#define BIT_STATUS2_ERROR   5

◆ BIT_STATUS2_HLAUNCH

#define BIT_STATUS2_HLAUNCH   0

◆ BIT_STATUS2_HRDLIM

#define BIT_STATUS2_HRDLIM   2

◆ BIT_STATUS2_IDLE

#define BIT_STATUS2_IDLE   6

◆ BIT_STATUS2_SFTLIM

#define BIT_STATUS2_SFTLIM   3

◆ BIT_STATUS2_SLAUNCH

#define BIT_STATUS2_SLAUNCH   1

◆ BIT_STATUS2_SYNC

#define BIT_STATUS2_SYNC   7

◆ BIT_STATUS3_FUEL2_ACTIVE

#define BIT_STATUS3_FUEL2_ACTIVE   2

◆ BIT_STATUS3_HALFSYNC

#define BIT_STATUS3_HALFSYNC   4

◆ BIT_STATUS3_NITROUS

#define BIT_STATUS3_NITROUS   1

◆ BIT_STATUS3_NSQUIRTS1

#define BIT_STATUS3_NSQUIRTS1   5

◆ BIT_STATUS3_RESET_PREVENT

#define BIT_STATUS3_RESET_PREVENT   0

◆ BIT_STATUS3_UNUSED1

#define BIT_STATUS3_UNUSED1   6

◆ BIT_STATUS3_UNUSED2

#define BIT_STATUS3_UNUSED2   7

◆ BIT_STATUS3_VSS_REFRESH

#define BIT_STATUS3_VSS_REFRESH   3

◆ BIT_STATUS4_ALLOW_LEGACY_COMMS

#define BIT_STATUS4_ALLOW_LEGACY_COMMS   7

◆ BIT_STATUS4_BURNPENDING

#define BIT_STATUS4_BURNPENDING   4

◆ BIT_STATUS4_COMMS_COMPAT

#define BIT_STATUS4_COMMS_COMPAT   6

◆ BIT_STATUS4_FAN

#define BIT_STATUS4_FAN   3

◆ BIT_STATUS4_STAGING_ACTIVE

#define BIT_STATUS4_STAGING_ACTIVE   5

◆ BIT_STATUS4_VVT1_ERROR

#define BIT_STATUS4_VVT1_ERROR   1

◆ BIT_STATUS4_VVT2_ERROR

#define BIT_STATUS4_VVT2_ERROR   2

◆ BIT_STATUS4_WMI_EMPTY

#define BIT_STATUS4_WMI_EMPTY   0

◆ BIT_STATUS5_FLATSH

#define BIT_STATUS5_FLATSH   0

◆ BIT_STATUS5_FLATSS

#define BIT_STATUS5_FLATSS   1

◆ BIT_STATUS5_KNOCK_ACTIVE

#define BIT_STATUS5_KNOCK_ACTIVE   3

◆ BIT_STATUS5_KNOCK_PULSE

#define BIT_STATUS5_KNOCK_PULSE   4

◆ BIT_STATUS5_SPARK2_ACTIVE

#define BIT_STATUS5_SPARK2_ACTIVE   2

◆ BIT_STATUS5_UNUSED6

#define BIT_STATUS5_UNUSED6   5

◆ BIT_STATUS5_UNUSED7

#define BIT_STATUS5_UNUSED7   6

◆ BIT_STATUS5_UNUSED8

#define BIT_STATUS5_UNUSED8   7

◆ ENGINE_PROTECT_BIT_AFR

#define ENGINE_PROTECT_BIT_AFR   3

◆ ENGINE_PROTECT_BIT_COOLANT

#define ENGINE_PROTECT_BIT_COOLANT   4

◆ ENGINE_PROTECT_BIT_MAP

#define ENGINE_PROTECT_BIT_MAP   1

◆ ENGINE_PROTECT_BIT_OIL

#define ENGINE_PROTECT_BIT_OIL   2

◆ ENGINE_PROTECT_BIT_RPM

#define ENGINE_PROTECT_BIT_RPM   0

Typedef Documentation

◆ byte

Function Documentation

◆ HasAnySync()

static bool HasAnySync ( const statuses status)
inlinestatic
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HasAnySyncUnsafe()

static bool HasAnySyncUnsafe ( const statuses status)
inlinestatic

Non-atomic version of HasAnySync. **Should only be called in an ATOMIC() block***.

Here is the call graph for this function:
Here is the caller graph for this function: