rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
rusefi_wideband.h
Go to the documentation of this file.
1// file rusefi_wideband.h
2
3#pragma once
4#include "can.h"
5
6// Return index of CAN bus where WBO(s) live
7size_t getWidebandBus();
8
9// Send info to the wideband controller like battery voltage, heater enable bit, etc.
10void sendWidebandInfo();
11
12// Handles ack and pong responses from the wideband bootloader
13void handleWidebandCan(const size_t busIndex, const CANRxFrame &frame);
14
15// Pings wideband controller, reply includes protocol version and FW build date
16void pingWideband(uint8_t hwIndex);
17
18// Set CAN index to given wideband controller, does not wait for ack, does not block calling thread
19void setWidebandOffsetNoWait(uint8_t hwIndex, uint8_t index);
20
21// WARNING:
22// Two following functions can block thread execution while waiting for ACK from WBO
23// Do not call from critical tasks!
24// Usually called from bench test task
25// Also do not call from ISR context
26
27// Set the CAN index offset of any (hwIndex = 0xff) or specific (hwIndex != 0xff) wideband controller
28// Addressing by hwIndex is supported by 2025 WBO FW
29void setWidebandOffset(uint8_t hwIndex, uint8_t index);
30
31// Set Sensor type for hwIndex wideband controller
32// Supported by late 2025 WBO FW
33void setWidebandSensorType(uint8_t hwIndex, uint8_t type);
34
35#if EFI_WIDEBAND_FIRMWARE_UPDATE
36// Update the firmware on any connected wideband controller
37void updateWidebandFirmware(uint8_t hwIndex);
38#endif //EFI_WIDEBAND_FIRMWARE_UPDATE
void handleWidebandCan(const size_t busIndex, const CANRxFrame &frame)
void setWidebandSensorType(uint8_t hwIndex, uint8_t type)
void setWidebandOffsetNoWait(uint8_t hwIndex, uint8_t index)
void pingWideband(uint8_t hwIndex)
void sendWidebandInfo()
void setWidebandOffset(uint8_t hwIndex, uint8_t index)
void updateWidebandFirmware(uint8_t hwIndex)
size_t getWidebandBus()