Speeduino
Loading...
Searching...
No Matches
Macros | Functions | Variables
auxiliaries.h File Reference
#include <BOARD_H>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SIMPLE_BOOST_P   1
 
#define SIMPLE_BOOST_I   1
 
#define SIMPLE_BOOST_D   1
 
#define BOOST_PIN_LOW()   ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { *boost_pin_port &= ~(boost_pin_mask); }
 
#define BOOST_PIN_HIGH()   ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { *boost_pin_port |= (boost_pin_mask); }
 
#define VVT1_PIN_LOW()   ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { *vvt1_pin_port &= ~(vvt1_pin_mask); }
 
#define VVT1_PIN_HIGH()   ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { *vvt1_pin_port |= (vvt1_pin_mask); }
 
#define VVT2_PIN_LOW()   ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { *vvt2_pin_port &= ~(vvt2_pin_mask); }
 
#define VVT2_PIN_HIGH()   ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { *vvt2_pin_port |= (vvt2_pin_mask); }
 
#define N2O_STAGE1_PIN_LOW()   ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { *n2o_stage1_pin_port &= ~(n2o_stage1_pin_mask); }
 
#define N2O_STAGE1_PIN_HIGH()   ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { *n2o_stage1_pin_port |= (n2o_stage1_pin_mask); }
 
#define N2O_STAGE2_PIN_LOW()   ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { *n2o_stage2_pin_port &= ~(n2o_stage2_pin_mask); }
 
#define N2O_STAGE2_PIN_HIGH()   ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { *n2o_stage2_pin_port |= (n2o_stage2_pin_mask); }
 
#define FUEL_PUMP_ON()   ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { *pump_pin_port |= (pump_pin_mask); }
 
#define FUEL_PUMP_OFF()   ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { *pump_pin_port &= ~(pump_pin_mask); }
 
#define FAN_PIN_LOW()   *fan_pin_port &= ~(fan_pin_mask)
 
#define FAN_PIN_HIGH()   *fan_pin_port |= (fan_pin_mask)
 
#define AIRCON_PIN_LOW()   *aircon_comp_pin_port &= ~(aircon_comp_pin_mask)
 
#define AIRCON_PIN_HIGH()   *aircon_comp_pin_port |= (aircon_comp_pin_mask)
 
#define AIRCON_FAN_PIN_LOW()   *aircon_fan_pin_port &= ~(aircon_fan_pin_mask)
 
#define AIRCON_FAN_PIN_HIGH()   *aircon_fan_pin_port |= (aircon_fan_pin_mask)
 
#define AIRCON_ON()   ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { ((((configPage15.airConCompPol)==1)) ? AIRCON_PIN_LOW() : AIRCON_PIN_HIGH()); BIT_SET(currentStatus.airConStatus, BIT_AIRCON_COMPRESSOR); }
 
#define AIRCON_OFF()   ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { ((((configPage15.airConCompPol)==1)) ? AIRCON_PIN_HIGH() : AIRCON_PIN_LOW()); BIT_CLEAR(currentStatus.airConStatus, BIT_AIRCON_COMPRESSOR); }
 
#define AIRCON_FAN_ON()   ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { ((((configPage15.airConFanPol)==1)) ? AIRCON_FAN_PIN_LOW() : AIRCON_FAN_PIN_HIGH()); BIT_SET(currentStatus.airConStatus, BIT_AIRCON_FAN); }
 
#define AIRCON_FAN_OFF()   ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { ((((configPage15.airConFanPol)==1)) ? AIRCON_FAN_PIN_HIGH() : AIRCON_FAN_PIN_LOW()); BIT_CLEAR(currentStatus.airConStatus, BIT_AIRCON_FAN); }
 
#define FAN_ON()   ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { ((configPage6.fanInv) ? FAN_PIN_LOW() : FAN_PIN_HIGH()); }
 
#define FAN_OFF()   ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { ((configPage6.fanInv) ? FAN_PIN_HIGH() : FAN_PIN_LOW()); }
 
#define READ_N2O_ARM_PIN()   ((*n2o_arming_pin_port & n2o_arming_pin_mask) ? true : false)
 
#define VVT1_PIN_ON()   VVT1_PIN_HIGH();
 
#define VVT1_PIN_OFF()   VVT1_PIN_LOW();
 
#define VVT2_PIN_ON()   VVT2_PIN_HIGH();
 
#define VVT2_PIN_OFF()   VVT2_PIN_LOW();
 
#define VVT_TIME_DELAY_MULTIPLIER   50
 
#define WMI_TANK_IS_EMPTY()   ((configPage10.wmiEmptyEnabled) ? ((configPage10.wmiEmptyPolarity) ? digitalRead(pinWMIEmpty) : !digitalRead(pinWMIEmpty)) : 1)
 

Functions

void initialiseAuxPWM (void)
 
void boostControl (void)
 
void boostDisable (void)
 
void boostByGear (void)
 
void vvtControl (void)
 
void initialiseFan (void)
 
void initialiseAirCon (void)
 
void nitrousControl (void)
 
void fanControl (void)
 
void airConControl (void)
 
bool READ_AIRCON_REQUEST (void)
 
void wmiControl (void)
 
void boostInterrupt (void)
 
void vvtInterrupt (void)
 

Variables

volatile PORT_TYPEvvt1_pin_port
 
volatile PINMASK_TYPE vvt1_pin_mask
 
volatile PORT_TYPEvvt2_pin_port
 
volatile PINMASK_TYPE vvt2_pin_mask
 
volatile PORT_TYPEfan_pin_port
 
volatile PINMASK_TYPE fan_pin_mask
 
uint16_t vvt_pwm_max_count
 
uint16_t boost_pwm_max_count
 

Macro Definition Documentation

◆ AIRCON_FAN_OFF

#define AIRCON_FAN_OFF ( )    ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { ((((configPage15.airConFanPol)==1)) ? AIRCON_FAN_PIN_HIGH() : AIRCON_FAN_PIN_LOW()); BIT_CLEAR(currentStatus.airConStatus, BIT_AIRCON_FAN); }

◆ AIRCON_FAN_ON

#define AIRCON_FAN_ON ( )    ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { ((((configPage15.airConFanPol)==1)) ? AIRCON_FAN_PIN_LOW() : AIRCON_FAN_PIN_HIGH()); BIT_SET(currentStatus.airConStatus, BIT_AIRCON_FAN); }

◆ AIRCON_FAN_PIN_HIGH

#define AIRCON_FAN_PIN_HIGH ( )    *aircon_fan_pin_port |= (aircon_fan_pin_mask)

◆ AIRCON_FAN_PIN_LOW

#define AIRCON_FAN_PIN_LOW ( )    *aircon_fan_pin_port &= ~(aircon_fan_pin_mask)

◆ AIRCON_OFF

#define AIRCON_OFF ( )    ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { ((((configPage15.airConCompPol)==1)) ? AIRCON_PIN_HIGH() : AIRCON_PIN_LOW()); BIT_CLEAR(currentStatus.airConStatus, BIT_AIRCON_COMPRESSOR); }

◆ AIRCON_ON

#define AIRCON_ON ( )    ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { ((((configPage15.airConCompPol)==1)) ? AIRCON_PIN_LOW() : AIRCON_PIN_HIGH()); BIT_SET(currentStatus.airConStatus, BIT_AIRCON_COMPRESSOR); }

◆ AIRCON_PIN_HIGH

#define AIRCON_PIN_HIGH ( )    *aircon_comp_pin_port |= (aircon_comp_pin_mask)

◆ AIRCON_PIN_LOW

#define AIRCON_PIN_LOW ( )    *aircon_comp_pin_port &= ~(aircon_comp_pin_mask)

◆ BOOST_PIN_HIGH

#define BOOST_PIN_HIGH ( )    ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { *boost_pin_port |= (boost_pin_mask); }

◆ BOOST_PIN_LOW

#define BOOST_PIN_LOW ( )    ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { *boost_pin_port &= ~(boost_pin_mask); }

◆ FAN_OFF

#define FAN_OFF ( )    ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { ((configPage6.fanInv) ? FAN_PIN_HIGH() : FAN_PIN_LOW()); }

◆ FAN_ON

#define FAN_ON ( )    ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { ((configPage6.fanInv) ? FAN_PIN_LOW() : FAN_PIN_HIGH()); }

◆ FAN_PIN_HIGH

#define FAN_PIN_HIGH ( )    *fan_pin_port |= (fan_pin_mask)

◆ FAN_PIN_LOW

#define FAN_PIN_LOW ( )    *fan_pin_port &= ~(fan_pin_mask)

◆ FUEL_PUMP_OFF

#define FUEL_PUMP_OFF ( )    ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { *pump_pin_port &= ~(pump_pin_mask); }

◆ FUEL_PUMP_ON

#define FUEL_PUMP_ON ( )    ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { *pump_pin_port |= (pump_pin_mask); }

◆ N2O_STAGE1_PIN_HIGH

◆ N2O_STAGE1_PIN_LOW

◆ N2O_STAGE2_PIN_HIGH

◆ N2O_STAGE2_PIN_LOW

◆ READ_N2O_ARM_PIN

#define READ_N2O_ARM_PIN ( )    ((*n2o_arming_pin_port & n2o_arming_pin_mask) ? true : false)

◆ SIMPLE_BOOST_D

#define SIMPLE_BOOST_D   1

◆ SIMPLE_BOOST_I

#define SIMPLE_BOOST_I   1

◆ SIMPLE_BOOST_P

#define SIMPLE_BOOST_P   1

◆ VVT1_PIN_HIGH

#define VVT1_PIN_HIGH ( )    ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { *vvt1_pin_port |= (vvt1_pin_mask); }

◆ VVT1_PIN_LOW

#define VVT1_PIN_LOW ( )    ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { *vvt1_pin_port &= ~(vvt1_pin_mask); }

◆ VVT1_PIN_OFF

#define VVT1_PIN_OFF ( )    VVT1_PIN_LOW();

◆ VVT1_PIN_ON

#define VVT1_PIN_ON ( )    VVT1_PIN_HIGH();

◆ VVT2_PIN_HIGH

#define VVT2_PIN_HIGH ( )    ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { *vvt2_pin_port |= (vvt2_pin_mask); }

◆ VVT2_PIN_LOW

#define VVT2_PIN_LOW ( )    ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { *vvt2_pin_port &= ~(vvt2_pin_mask); }

◆ VVT2_PIN_OFF

#define VVT2_PIN_OFF ( )    VVT2_PIN_LOW();

◆ VVT2_PIN_ON

#define VVT2_PIN_ON ( )    VVT2_PIN_HIGH();

◆ VVT_TIME_DELAY_MULTIPLIER

#define VVT_TIME_DELAY_MULTIPLIER   50

◆ WMI_TANK_IS_EMPTY

#define WMI_TANK_IS_EMPTY ( )    ((configPage10.wmiEmptyEnabled) ? ((configPage10.wmiEmptyPolarity) ? digitalRead(pinWMIEmpty) : !digitalRead(pinWMIEmpty)) : 1)

Function Documentation

◆ airConControl()

void airConControl ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ boostByGear()

void boostByGear ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ boostControl()

void boostControl ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ boostDisable()

void boostDisable ( void  )
Here is the caller graph for this function:

◆ boostInterrupt()

void boostInterrupt ( void  )

◆ fanControl()

void fanControl ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialiseAirCon()

void initialiseAirCon ( void  )
Here is the caller graph for this function:

◆ initialiseAuxPWM()

void initialiseAuxPWM ( void  )
Here is the caller graph for this function:

◆ initialiseFan()

void initialiseFan ( void  )
Here is the caller graph for this function:

◆ nitrousControl()

void nitrousControl ( void  )
Here is the caller graph for this function:

◆ READ_AIRCON_REQUEST()

bool READ_AIRCON_REQUEST ( void  )
Here is the caller graph for this function:

◆ vvtControl()

void vvtControl ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vvtInterrupt()

void vvtInterrupt ( void  )

◆ wmiControl()

void wmiControl ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ boost_pwm_max_count

uint16_t boost_pwm_max_count
extern

◆ fan_pin_mask

volatile PINMASK_TYPE fan_pin_mask
extern

◆ fan_pin_port

volatile PORT_TYPE* fan_pin_port
extern

◆ vvt1_pin_mask

volatile PINMASK_TYPE vvt1_pin_mask
extern

◆ vvt1_pin_port

volatile PORT_TYPE* vvt1_pin_port
extern

◆ vvt2_pin_mask

volatile PINMASK_TYPE vvt2_pin_mask
extern

◆ vvt2_pin_port

volatile PORT_TYPE* vvt2_pin_port
extern

◆ vvt_pwm_max_count

uint16_t vvt_pwm_max_count
extern