rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
board_configuration.cpp
Go to the documentation of this file.
1#include "pch.h"
2
3#include "protected_gpio.h"
4#include "board_overrides.h"
5
7 // this board has no comms led
8 return Gpio::Unassigned;
9}
10
12 // this board has no warning led
13 return Gpio::Unassigned;
14}
15
17 // this board has no running led
18 return Gpio::Unassigned;
19}
20
22 // No divider, just direct connected analog inputs (they're all internal, so why divide?)
24
25 // 10k/100k divider
28
31}
32
33// TODO: these are made up values
34static constexpr float AmpsPerVolt = 10;
35
36// instantaneous limit is 100A
37// long-term limit is 20A
38static constexpr float MaxCurrent = 100;
39
40static const ProtectedGpioConfig cfgs[] = {
41 { Gpio::A0, EFI_ADC_10, AmpsPerVolt, MaxCurrent },
42 { Gpio::A1, EFI_ADC_11, AmpsPerVolt, MaxCurrent },
43 { Gpio::A2, EFI_ADC_12, AmpsPerVolt, MaxCurrent },
44 { Gpio::A3, EFI_ADC_13, AmpsPerVolt, MaxCurrent },
45 { Gpio::C9, EFI_ADC_14, AmpsPerVolt, MaxCurrent },
46 { Gpio::A8, EFI_ADC_15, AmpsPerVolt, MaxCurrent },
47 { Gpio::A9, EFI_ADC_8, AmpsPerVolt, MaxCurrent },
48 { Gpio::A10, EFI_ADC_9, AmpsPerVolt, MaxCurrent },
49};
50
54
59
Gpio getWarningLedPin()
Gpio getCommsLedPin()
Gpio getRunningLedPin()
void setup_custom_board_overrides()
std::optional< setup_custom_board_overrides_type > custom_board_InitHardware
Definition hardware.cpp:77
@ Unassigned
@ PROTECTED_PIN_0
std::optional< setup_custom_board_overrides_type > custom_board_ConfigOverrides
static constexpr engine_configuration_s * engineConfiguration
int protectedGpio_add(brain_pin_e base, const ProtectedGpioConfig *const configs)
static void tdg_pdm8_boardInitHardware()
static const ProtectedGpioConfig cfgs[]
static void tdg_pdm8_boardConfigOverrides()
static constexpr float MaxCurrent
static constexpr float AmpsPerVolt