rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
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))
 
void initCanGpioMsiobox ()
 

Variables

typedef __attribute__
 Ignition Mode.
 
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 155 of file can_gpio_msiobox.cpp.

155 {
160 MSIOBOX_FAILED // 4
@ MSIOBOX_FAILED
@ MSIOBOX_WAIT_INIT
@ MSIOBOX_DISABLED
@ MSIOBOX_WAIT_WHOAMI
@ MSIOBOX_READY

Function Documentation

◆ __attribute__()

struct pwm_settings __attribute__ ( (packed)  )

Definition at line 38 of file tooth_logger.h.

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

◆ initCanGpioMsiobox()

void initCanGpioMsiobox ( )

Definition at line 547 of file can_gpio_msiobox.cpp.

547 {
549 return;
550 }
551
552 // MSIOBOX_0_OUT_1
553 for (size_t i = 0; i < BOARD_CAN_GPIO_COUNT; i++) {
554 uint32_t can_id = CAN_IOBOX_BASE1 + 0x20 * (static_cast<uint32_t>(engineConfiguration->msIoBox0.id) - static_cast<uint32_t>(MsIoBoxId::ID200));
555
556 /* TODO: pick can bus and refresh rate from settings */
557 if (instance[i].config(0, can_id, 20) == 0) {
559 /* register */
560 int ret = gpiochip_register(Gpio::MSIOBOX_0_OUT_1, DRIVER_NAME, instance[i], MSIOBOX_SIGNALS);
561 if (ret < 0) {
562 // no error handling, not returning error code
563 return;
564 }
565 }
566 }
567
568 addConsoleAction("msioinfo", [](){
569 for (size_t i = 0; i < BOARD_CAN_GPIO_COUNT; i++) {
570 instance[i].printState();
571 }
572 });
573}
void registerCanListener(CanListener &listener)
Definition can_rx.cpp:84
static MsIoBox instance[BOARD_CAN_GPIO_COUNT]
void addConsoleAction(const char *token, Void callback)
Register console action without parameters.
@ MSIOBOX_0_OUT_1
int gpiochip_register(brain_pin_e base, const char *name, GpioChip &gpioChip, size_t size)
Register gpiochip.
Definition core.cpp:186
static constexpr persistent_config_s * config
static constexpr 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.

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 44 of file rusefi_enums.h.

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

◆ adc

beuint16_t adc[3]

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 doAddAction(), 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 545 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.