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

Go to the source code of this file.

Macros

#define MC33810_1_ACTIVE()   (*mc33810_1_pin_port &= ~(mc33810_1_pin_mask))
 
#define MC33810_1_INACTIVE()   (*mc33810_1_pin_port |= (mc33810_1_pin_mask))
 
#define MC33810_2_ACTIVE()   (*mc33810_2_pin_port &= ~(mc33810_2_pin_mask))
 
#define MC33810_2_INACTIVE()   (*mc33810_2_pin_port |= (mc33810_2_pin_mask))
 
#define openInjector1_MC33810()   MC33810_1_ACTIVE(); BIT_SET(mc33810_1_requestedState, MC33810_BIT_INJ1); mc33810_1_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_1_requestedState)); MC33810_1_INACTIVE()
 
#define openInjector2_MC33810()   MC33810_1_ACTIVE(); BIT_SET(mc33810_1_requestedState, MC33810_BIT_INJ2); mc33810_1_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_1_requestedState)); MC33810_1_INACTIVE()
 
#define openInjector3_MC33810()   MC33810_1_ACTIVE(); BIT_SET(mc33810_1_requestedState, MC33810_BIT_INJ3); mc33810_1_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_1_requestedState)); MC33810_1_INACTIVE()
 
#define openInjector4_MC33810()   MC33810_1_ACTIVE(); BIT_SET(mc33810_1_requestedState, MC33810_BIT_INJ4); mc33810_1_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_1_requestedState)); MC33810_1_INACTIVE()
 
#define openInjector5_MC33810()   MC33810_2_ACTIVE(); BIT_SET(mc33810_2_requestedState, MC33810_BIT_INJ5); mc33810_2_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_2_requestedState)); MC33810_2_INACTIVE()
 
#define openInjector6_MC33810()   MC33810_2_ACTIVE(); BIT_SET(mc33810_2_requestedState, MC33810_BIT_INJ6); mc33810_2_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_2_requestedState)); MC33810_2_INACTIVE()
 
#define openInjector7_MC33810()   MC33810_2_ACTIVE(); BIT_SET(mc33810_2_requestedState, MC33810_BIT_INJ7); mc33810_2_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_2_requestedState)); MC33810_2_INACTIVE()
 
#define openInjector8_MC33810()   MC33810_2_ACTIVE(); BIT_SET(mc33810_2_requestedState, MC33810_BIT_INJ8); mc33810_2_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_2_requestedState)); MC33810_2_INACTIVE()
 
#define closeInjector1_MC33810()   MC33810_1_ACTIVE(); BIT_CLEAR(mc33810_1_requestedState, MC33810_BIT_INJ1); mc33810_1_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_1_requestedState)); MC33810_1_INACTIVE()
 
#define closeInjector2_MC33810()   MC33810_1_ACTIVE(); BIT_CLEAR(mc33810_1_requestedState, MC33810_BIT_INJ2); mc33810_1_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_1_requestedState)); MC33810_1_INACTIVE()
 
#define closeInjector3_MC33810()   MC33810_1_ACTIVE(); BIT_CLEAR(mc33810_1_requestedState, MC33810_BIT_INJ3); mc33810_1_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_1_requestedState)); MC33810_1_INACTIVE()
 
#define closeInjector4_MC33810()   MC33810_1_ACTIVE(); BIT_CLEAR(mc33810_1_requestedState, MC33810_BIT_INJ4); mc33810_1_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_1_requestedState)); MC33810_1_INACTIVE()
 
#define closeInjector5_MC33810()   MC33810_2_ACTIVE(); BIT_CLEAR(mc33810_2_requestedState, MC33810_BIT_INJ5); mc33810_2_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_2_requestedState)); MC33810_2_INACTIVE()
 
#define closeInjector6_MC33810()   MC33810_2_ACTIVE(); BIT_CLEAR(mc33810_2_requestedState, MC33810_BIT_INJ6); mc33810_2_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_2_requestedState)); MC33810_2_INACTIVE()
 
#define closeInjector7_MC33810()   MC33810_2_ACTIVE(); BIT_CLEAR(mc33810_2_requestedState, MC33810_BIT_INJ7); mc33810_2_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_2_requestedState)); MC33810_2_INACTIVE()
 
#define closeInjector8_MC33810()   MC33810_2_ACTIVE(); BIT_CLEAR(mc33810_2_requestedState, MC33810_BIT_INJ8); mc33810_2_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_2_requestedState)); MC33810_2_INACTIVE()
 
#define injector1Toggle_MC33810()   MC33810_1_ACTIVE(); BIT_TOGGLE(mc33810_1_requestedState, MC33810_BIT_INJ1); mc33810_1_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_1_requestedState)); MC33810_1_INACTIVE()
 
#define injector2Toggle_MC33810()   MC33810_1_ACTIVE(); BIT_TOGGLE(mc33810_1_requestedState, MC33810_BIT_INJ2); mc33810_1_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_1_requestedState)); MC33810_1_INACTIVE()
 
#define injector3Toggle_MC33810()   MC33810_1_ACTIVE(); BIT_TOGGLE(mc33810_1_requestedState, MC33810_BIT_INJ3); mc33810_1_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_1_requestedState)); MC33810_1_INACTIVE()
 
#define injector4Toggle_MC33810()   MC33810_1_ACTIVE(); BIT_TOGGLE(mc33810_1_requestedState, MC33810_BIT_INJ4); mc33810_1_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_1_requestedState)); MC33810_1_INACTIVE()
 
#define injector5Toggle_MC33810()   MC33810_2_ACTIVE(); BIT_TOGGLE(mc33810_2_requestedState, MC33810_BIT_INJ5); mc33810_2_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_2_requestedState)); MC33810_2_INACTIVE()
 
#define injector6Toggle_MC33810()   MC33810_2_ACTIVE(); BIT_TOGGLE(mc33810_2_requestedState, MC33810_BIT_INJ6); mc33810_2_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_2_requestedState)); MC33810_2_INACTIVE()
 
#define injector7Toggle_MC33810()   MC33810_2_ACTIVE(); BIT_TOGGLE(mc33810_2_requestedState, MC33810_BIT_INJ7); mc33810_2_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_2_requestedState)); MC33810_2_INACTIVE()
 
#define injector8Toggle_MC33810()   MC33810_2_ACTIVE(); BIT_TOGGLE(mc33810_2_requestedState, MC33810_BIT_INJ8); mc33810_2_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_2_requestedState)); MC33810_2_INACTIVE()
 
#define coil1High_MC33810()   MC33810_1_ACTIVE(); BIT_SET(mc33810_1_requestedState, MC33810_BIT_IGN1); mc33810_1_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_1_requestedState)); MC33810_1_INACTIVE()
 
#define coil2High_MC33810()   MC33810_1_ACTIVE(); BIT_SET(mc33810_1_requestedState, MC33810_BIT_IGN2); mc33810_1_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_1_requestedState)); MC33810_1_INACTIVE()
 
#define coil3High_MC33810()   MC33810_1_ACTIVE(); BIT_SET(mc33810_1_requestedState, MC33810_BIT_IGN3); mc33810_1_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_1_requestedState)); MC33810_1_INACTIVE()
 
#define coil4High_MC33810()   MC33810_1_ACTIVE(); BIT_SET(mc33810_1_requestedState, MC33810_BIT_IGN4); mc33810_1_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_1_requestedState)); MC33810_1_INACTIVE()
 
#define coil5High_MC33810()   MC33810_2_ACTIVE(); BIT_SET(mc33810_2_requestedState, MC33810_BIT_IGN5); mc33810_2_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_2_requestedState)); MC33810_2_INACTIVE()
 
#define coil6High_MC33810()   MC33810_2_ACTIVE(); BIT_SET(mc33810_2_requestedState, MC33810_BIT_IGN6); mc33810_2_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_2_requestedState)); MC33810_2_INACTIVE()
 
#define coil7High_MC33810()   MC33810_2_ACTIVE(); BIT_SET(mc33810_2_requestedState, MC33810_BIT_IGN7); mc33810_2_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_2_requestedState)); MC33810_2_INACTIVE()
 
#define coil8High_MC33810()   MC33810_2_ACTIVE(); BIT_SET(mc33810_2_requestedState, MC33810_BIT_IGN8); mc33810_2_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_2_requestedState)); MC33810_2_INACTIVE()
 
#define coil1Low_MC33810()   MC33810_1_ACTIVE(); BIT_CLEAR(mc33810_1_requestedState, MC33810_BIT_IGN1); mc33810_1_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_1_requestedState)); MC33810_1_INACTIVE()
 
#define coil2Low_MC33810()   MC33810_1_ACTIVE(); BIT_CLEAR(mc33810_1_requestedState, MC33810_BIT_IGN2); mc33810_1_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_1_requestedState)); MC33810_1_INACTIVE()
 
#define coil3Low_MC33810()   MC33810_1_ACTIVE(); BIT_CLEAR(mc33810_1_requestedState, MC33810_BIT_IGN3); mc33810_1_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_1_requestedState)); MC33810_1_INACTIVE()
 
#define coil4Low_MC33810()   MC33810_1_ACTIVE(); BIT_CLEAR(mc33810_1_requestedState, MC33810_BIT_IGN4); mc33810_1_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_1_requestedState)); MC33810_1_INACTIVE()
 
#define coil5Low_MC33810()   MC33810_2_ACTIVE(); BIT_CLEAR(mc33810_2_requestedState, MC33810_BIT_IGN5); mc33810_2_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_2_requestedState)); MC33810_2_INACTIVE()
 
#define coil6Low_MC33810()   MC33810_2_ACTIVE(); BIT_CLEAR(mc33810_2_requestedState, MC33810_BIT_IGN6); mc33810_2_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_2_requestedState)); MC33810_2_INACTIVE()
 
#define coil7Low_MC33810()   MC33810_2_ACTIVE(); BIT_CLEAR(mc33810_2_requestedState, MC33810_BIT_IGN7); mc33810_2_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_2_requestedState)); MC33810_2_INACTIVE()
 
#define coil8Low_MC33810()   MC33810_2_ACTIVE(); BIT_CLEAR(mc33810_2_requestedState, MC33810_BIT_IGN8); mc33810_2_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_2_requestedState)); MC33810_2_INACTIVE()
 
#define coil1Toggle_MC33810()   MC33810_1_ACTIVE(); BIT_TOGGLE(mc33810_1_requestedState, MC33810_BIT_IGN1); mc33810_1_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_1_requestedState)); MC33810_1_INACTIVE()
 
#define coil2Toggle_MC33810()   MC33810_1_ACTIVE(); BIT_TOGGLE(mc33810_1_requestedState, MC33810_BIT_IGN2); mc33810_1_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_1_requestedState)); MC33810_1_INACTIVE()
 
#define coil3Toggle_MC33810()   MC33810_1_ACTIVE(); BIT_TOGGLE(mc33810_1_requestedState, MC33810_BIT_IGN3); mc33810_1_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_1_requestedState)); MC33810_1_INACTIVE()
 
#define coil4Toggle_MC33810()   MC33810_1_ACTIVE(); BIT_TOGGLE(mc33810_1_requestedState, MC33810_BIT_IGN4); mc33810_1_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_1_requestedState)); MC33810_1_INACTIVE()
 
#define coil5Toggle_MC33810()   MC33810_2_ACTIVE(); BIT_TOGGLE(mc33810_2_requestedState, MC33810_BIT_IGN5); mc33810_2_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_2_requestedState)); MC33810_2_INACTIVE()
 
#define coil6Toggle_MC33810()   MC33810_2_ACTIVE(); BIT_TOGGLE(mc33810_2_requestedState, MC33810_BIT_IGN6); mc33810_2_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_2_requestedState)); MC33810_2_INACTIVE()
 
#define coil7Toggle_MC33810()   MC33810_2_ACTIVE(); BIT_TOGGLE(mc33810_2_requestedState, MC33810_BIT_IGN7); mc33810_2_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_2_requestedState)); MC33810_2_INACTIVE()
 
#define coil8Toggle_MC33810()   MC33810_2_ACTIVE(); BIT_TOGGLE(mc33810_2_requestedState, MC33810_BIT_IGN8); mc33810_2_returnState = SPI.transfer16(word(MC33810_ONOFF_CMD, mc33810_2_requestedState)); MC33810_2_INACTIVE()
 

Functions

void initMC33810 (void)
 

Variables

volatile PORT_TYPEmc33810_1_pin_port
 
volatile PINMASK_TYPE mc33810_1_pin_mask
 
volatile PORT_TYPEmc33810_2_pin_port
 
volatile PINMASK_TYPE mc33810_2_pin_mask
 
static const uint8_t MC33810_ONOFF_CMD = 0x30
 
static volatile uint8_t mc33810_1_requestedState
 
static volatile uint8_t mc33810_2_requestedState
 
static volatile uint8_t mc33810_1_returnState
 
static volatile uint8_t mc33810_2_returnState
 
uint8_t MC33810_BIT_INJ1
 
uint8_t MC33810_BIT_INJ2
 
uint8_t MC33810_BIT_INJ3
 
uint8_t MC33810_BIT_INJ4
 
uint8_t MC33810_BIT_INJ5
 
uint8_t MC33810_BIT_INJ6
 
uint8_t MC33810_BIT_INJ7
 
uint8_t MC33810_BIT_INJ8
 
uint8_t MC33810_BIT_IGN1
 
uint8_t MC33810_BIT_IGN2
 
uint8_t MC33810_BIT_IGN3
 
uint8_t MC33810_BIT_IGN4
 
uint8_t MC33810_BIT_IGN5
 
uint8_t MC33810_BIT_IGN6
 
uint8_t MC33810_BIT_IGN7
 
uint8_t MC33810_BIT_IGN8
 

Macro Definition Documentation

◆ closeInjector1_MC33810

◆ closeInjector2_MC33810

◆ closeInjector3_MC33810

◆ closeInjector4_MC33810

◆ closeInjector5_MC33810

◆ closeInjector6_MC33810

◆ closeInjector7_MC33810

◆ closeInjector8_MC33810

◆ coil1High_MC33810

◆ coil1Low_MC33810

◆ coil1Toggle_MC33810

◆ coil2High_MC33810

◆ coil2Low_MC33810

◆ coil2Toggle_MC33810

◆ coil3High_MC33810

◆ coil3Low_MC33810

◆ coil3Toggle_MC33810

◆ coil4High_MC33810

◆ coil4Low_MC33810

◆ coil4Toggle_MC33810

◆ coil5High_MC33810

◆ coil5Low_MC33810

◆ coil5Toggle_MC33810

◆ coil6High_MC33810

◆ coil6Low_MC33810

◆ coil6Toggle_MC33810

◆ coil7High_MC33810

◆ coil7Low_MC33810

◆ coil7Toggle_MC33810

◆ coil8High_MC33810

◆ coil8Low_MC33810

◆ coil8Toggle_MC33810

◆ injector1Toggle_MC33810

◆ injector2Toggle_MC33810

◆ injector3Toggle_MC33810

◆ injector4Toggle_MC33810

◆ injector5Toggle_MC33810

◆ injector6Toggle_MC33810

◆ injector7Toggle_MC33810

◆ injector8Toggle_MC33810

◆ MC33810_1_ACTIVE

#define MC33810_1_ACTIVE ( )    (*mc33810_1_pin_port &= ~(mc33810_1_pin_mask))

◆ MC33810_1_INACTIVE

#define MC33810_1_INACTIVE ( )    (*mc33810_1_pin_port |= (mc33810_1_pin_mask))

◆ MC33810_2_ACTIVE

#define MC33810_2_ACTIVE ( )    (*mc33810_2_pin_port &= ~(mc33810_2_pin_mask))

◆ MC33810_2_INACTIVE

#define MC33810_2_INACTIVE ( )    (*mc33810_2_pin_port |= (mc33810_2_pin_mask))

◆ openInjector1_MC33810

◆ openInjector2_MC33810

◆ openInjector3_MC33810

◆ openInjector4_MC33810

◆ openInjector5_MC33810

◆ openInjector6_MC33810

◆ openInjector7_MC33810

◆ openInjector8_MC33810

Function Documentation

◆ initMC33810()

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

Variable Documentation

◆ mc33810_1_pin_mask

volatile PINMASK_TYPE mc33810_1_pin_mask
extern

◆ mc33810_1_pin_port

volatile PORT_TYPE* mc33810_1_pin_port
extern

◆ mc33810_1_requestedState

volatile uint8_t mc33810_1_requestedState
static

◆ mc33810_1_returnState

volatile uint8_t mc33810_1_returnState
static

◆ mc33810_2_pin_mask

volatile PINMASK_TYPE mc33810_2_pin_mask
extern

◆ mc33810_2_pin_port

volatile PORT_TYPE* mc33810_2_pin_port
extern

◆ mc33810_2_requestedState

volatile uint8_t mc33810_2_requestedState
static

◆ mc33810_2_returnState

volatile uint8_t mc33810_2_returnState
static

◆ MC33810_BIT_IGN1

uint8_t MC33810_BIT_IGN1
extern

◆ MC33810_BIT_IGN2

uint8_t MC33810_BIT_IGN2
extern

◆ MC33810_BIT_IGN3

uint8_t MC33810_BIT_IGN3
extern

◆ MC33810_BIT_IGN4

uint8_t MC33810_BIT_IGN4
extern

◆ MC33810_BIT_IGN5

uint8_t MC33810_BIT_IGN5
extern

◆ MC33810_BIT_IGN6

uint8_t MC33810_BIT_IGN6
extern

◆ MC33810_BIT_IGN7

uint8_t MC33810_BIT_IGN7
extern

◆ MC33810_BIT_IGN8

uint8_t MC33810_BIT_IGN8
extern

◆ MC33810_BIT_INJ1

uint8_t MC33810_BIT_INJ1
extern

◆ MC33810_BIT_INJ2

uint8_t MC33810_BIT_INJ2
extern

◆ MC33810_BIT_INJ3

uint8_t MC33810_BIT_INJ3
extern

◆ MC33810_BIT_INJ4

uint8_t MC33810_BIT_INJ4
extern

◆ MC33810_BIT_INJ5

uint8_t MC33810_BIT_INJ5
extern

◆ MC33810_BIT_INJ6

uint8_t MC33810_BIT_INJ6
extern

◆ MC33810_BIT_INJ7

uint8_t MC33810_BIT_INJ7
extern

◆ MC33810_BIT_INJ8

uint8_t MC33810_BIT_INJ8
extern

◆ MC33810_ONOFF_CMD

const uint8_t MC33810_ONOFF_CMD = 0x30
static