rusEFI
The most advanced open source ECU
Enumerations | Functions | Variables
can_gpio_msiobox.cpp File Reference

Enumerations

enum  msiobox_state {
  MSIOBOX_DISABLED = 0 , MSIOBOX_WAIT_INIT , MSIOBOX_WAIT_WHOAMI , MSIOBOX_READY ,
  MSIOBOX_FAILED
}
 

Functions

struct pwm_settings __attribute__ ((packed))
 
int initCanGpioMsiobox ()
 

Variables

typedef __attribute__
 Ignition Mode. More...
 
beuint16_t on
 
beuint16_t off
 
uint8_t pwm_mask
 
uint8_t pad0
 
uint8_t tachin_mask
 
uint8_t pad1
 
uint8_t adc_broadcast_interval
 
uint8_t tach_broadcast_interval
 
uint8_t pad2 [2]
 
pwm_settings ch [2]
 
uint8_t out_state
 
uint8_t version
 
uint8_t pad [3]
 
beuint16_t pwm_period
 
beuint16_t tachin_period
 
beuint16_t adc [4]
 
uint8_t inputs
 
beuint32_t period
 
beuint16_t n_teeth
 
beuint16_t total_tooth
 
static MsIoBox instance [BOARD_CAN_GPIO_COUNT]
 

Enumeration Type Documentation

◆ msiobox_state

Enumerator
MSIOBOX_DISABLED 
MSIOBOX_WAIT_INIT 
MSIOBOX_WAIT_WHOAMI 
MSIOBOX_READY 
MSIOBOX_FAILED 

Definition at line 154 of file can_gpio_msiobox.cpp.

154  {
155  MSIOBOX_DISABLED = 0,
160 } msiobox_state;
msiobox_state
@ MSIOBOX_FAILED
@ MSIOBOX_WAIT_INIT
@ MSIOBOX_DISABLED
@ MSIOBOX_WAIT_WHOAMI
@ MSIOBOX_READY

Function Documentation

◆ __attribute__()

struct pwm_settings __attribute__ ( (packed)  )

Definition at line 36 of file tooth_logger.h.

38  {
39  // the whole order of all packet bytes is reversed, not just the 'endian-swap' integers
40  uint32_t timestamp;
41  // unfortunately all these fields are required by TS...
42  bool priLevel : 1;
43  bool secLevel : 1;
44  bool trigger : 1;
45  bool sync : 1;
46  bool coil : 1;
47  bool injector : 1;
static bool sync(void *instance)
composite_logger_s
Definition: tooth_logger.h:48

◆ initCanGpioMsiobox()

int initCanGpioMsiobox ( )

Definition at line 538 of file can_gpio_msiobox.cpp.

538  {
540  return 0;
541  }
542 
543  // MSIOBOX_0_OUT_1
544  for (size_t i = 0; i < BOARD_CAN_GPIO_COUNT; i++) {
545  uint32_t can_id = CAN_IOBOX_BASE1 + 0x20 * (static_cast<uint32_t>(engineConfiguration->msIoBox0.id) - static_cast<uint32_t>(MsIoBoxId::ID200));
546 
547  /* TODO: pick can bus and refresh rate from settings */
548  if (instance[i].config(0, can_id, 20) == 0) {
550  /* register */
551  int ret = gpiochip_register(Gpio::MSIOBOX_0_OUT_1, DRIVER_NAME, instance[i], MSIOBOX_SIGNALS);
552  if (ret < 0)
553  return ret;
554  }
555  }
556  return 0;
557 }
void registerCanListener(CanListener &listener)
Definition: can_rx.cpp:89
static MsIoBox instance[BOARD_CAN_GPIO_COUNT]
@ MSIOBOX_0_OUT_1
int gpiochip_register(brain_pin_e base, const char *name, GpioChip &gpioChip, size_t size)
Register gpiochip.
Definition: core.cpp:185
persistent_config_s * config
engine_configuration_s * engineConfiguration

Referenced by initSmartGpio().

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

Variable Documentation

◆ __attribute__

int __attribute__

Ignition Mode.

This enum is used to select your desired Engine Load calculation algorithm

See also
getNumberOfInjections

See spi3mosiPin See spi2MisoMode

inertia measurement unit, yawn accelerometer By the way both kinds of BOSCH use Housing : TE 1-967640-1, pins 144969-1 seal 967056-1 plug 967067-2

Net Body Computer types

This mode is useful for troubleshooting and research - events are logged but no effects on phase synchronization

Single tooth on the camshaft anywhere in the 720 degree cycle

Toyota 2JZ has three cam tooth. We pick one of these three tooth to synchronize based on the expected angle position of the event

Mazda NB2 has three cam tooth. We synchronize based on gap ratio.

See also
TT_VVT_MIATA_NB
TT_VVT_BOSCH_QUICK_START

1.8l Toyota 1ZZ-FE https://rusefi.com/forum/viewtopic.php?f=3&t=1735 4 minus one

4 equally spaced no way to sync

4 plus one

Definition at line 43 of file rusefi_enums.h.

52  {
53  /**
54  * This mode is useful for troubleshooting and research - events are logged but no effects on phase synchronization
55  */
56  VVT_INACTIVE = 0,
57 
58  /**
59  * Single tooth on the camshaft anywhere in the 720 degree cycle
60  */
61  VVT_SINGLE_TOOTH = 1,
62  /**
63  * Toyota 2JZ has three cam tooth. We pick one of these three tooth to synchronize based on the expected angle position of the event
64  */
65  VVT_TOYOTA_3_TOOTH = 2,
66  /**
67  * Mazda NB2 has three cam tooth. We synchronize based on gap ratio.
68  * @see TT_VVT_MIATA_NB
69  */
70  VVT_MIATA_NB = 3,
71 
72  VVT_MITSUBISHI_4G69 = 4,
73 
74  /**
75  * @see TT_VVT_BOSCH_QUICK_START
76  */
77  VVT_BOSCH_QUICK_START = 5,
78 
79  /**
80  * 1.8l Toyota 1ZZ-FE https://rusefi.com/forum/viewtopic.php?f=3&t=1735
81  * 4 minus one
82  */
83  VVT_TOYOTA_4_1 = 6,
84 
85  VVT_FORD_ST170 = 7,
86 
87  VVT_BARRA_3_PLUS_1 = 8,
88 
89  VVT_NISSAN_VQ = 9,
90 
91  /**
92  * 4 equally spaced no way to sync
93  */
94  VVT_HONDA_K_INTAKE = 10,
95 
96  VVT_NISSAN_MR = 11,
97 
98  VVT_MITSUBISHI_3A92 = 12,
99 
100  VVT_MAP_V_TWIN = 13,
101 
102  VVT_MITSUBISHI_6G75 = 14,
103 
104  VVT_MAZDA_SKYACTIV = 15,
105 
106  /**
107  * 4 plus one
108  */
109  VVT_HONDA_K_EXHAUST = 16,
110 
111  VVT_MITSUBISHI_4G9x = 17,
112  VVT_MITSUBISHI_4G63 = 18,
113 
114  VVT_FORD_COYOTE = 19,
115 
116  VVT_MITSUBISHI_6G72 = 20,
117 
118  VVT_HONDA_CBR_600 = 21,
119 
120 } vvt_mode_e;
vvt_mode_e
Definition: rusefi_enums.h:120

◆ adc

beuint16_t adc

Definition at line 0 of file can_gpio_msiobox.cpp.

◆ adc_broadcast_interval

uint8_t adc_broadcast_interval

Definition at line 4 of file can_gpio_msiobox.cpp.

◆ ch

pwm_settings ch

Definition at line 0 of file can_gpio_msiobox.cpp.

Referenced by chDbgPanic3(), doAddAction(), getRemainingStack(), and tokenLength().

◆ inputs

uint8_t inputs

Definition at line 0 of file can_gpio_msiobox.cpp.

◆ instance

MsIoBox instance[BOARD_CAN_GPIO_COUNT]
static

Definition at line 536 of file can_gpio_msiobox.cpp.

Referenced by initCanGpioMsiobox().

◆ n_teeth

beuint16_t n_teeth

Definition at line 1 of file can_gpio_msiobox.cpp.

◆ off

beuint16_t off

Definition at line 1 of file can_gpio_msiobox.cpp.

Referenced by add4cylblock(), and initJeep18_2_2_2().

◆ on

beuint16_t on

Definition at line 0 of file can_gpio_msiobox.cpp.

◆ out_state

uint8_t out_state

Definition at line 1 of file can_gpio_msiobox.cpp.

◆ pad

uint8_t pad

◆ pad0

uint8_t pad0

Definition at line 1 of file can_gpio_msiobox.cpp.

◆ pad1

uint8_t pad1

Definition at line 3 of file can_gpio_msiobox.cpp.

◆ pad2

uint8_t pad2[2]

Definition at line 6 of file can_gpio_msiobox.cpp.

◆ period

beuint32_t period

◆ pwm_mask

uint8_t pwm_mask

Definition at line 0 of file can_gpio_msiobox.cpp.

◆ pwm_period

beuint16_t pwm_period

Definition at line 2 of file can_gpio_msiobox.cpp.

◆ tach_broadcast_interval

uint8_t tach_broadcast_interval

Definition at line 5 of file can_gpio_msiobox.cpp.

◆ tachin_mask

uint8_t tachin_mask

Definition at line 2 of file can_gpio_msiobox.cpp.

◆ tachin_period

beuint16_t tachin_period

Definition at line 3 of file can_gpio_msiobox.cpp.

◆ total_tooth

beuint16_t total_tooth

Definition at line 2 of file can_gpio_msiobox.cpp.

◆ version

uint8_t version

Definition at line 0 of file can_gpio_msiobox.cpp.

Referenced by updateTriggerWaveformIfNeeded().

Go to the source code of this file.