rusEFI
The most advanced open source ECU
|
Functions | |
brain_pin_e | getMisoPin (spi_device_e device) |
brain_pin_e | getMosiPin (spi_device_e device) |
brain_pin_e | getSckPin (spi_device_e device) |
SPIDriver * | getSpiDevice (spi_device_e spiDevice) |
void | lockSpi (spi_device_e device) |
void | unlockSpi (spi_device_e device) |
static void | initSpiModules () |
void | stopSpi (spi_device_e device) |
static void | stopSpiModules () |
void | printSpiConfig (const char *msg, spi_device_e device) |
void | onFastAdcComplete (adcsample_t *) |
static void | calcFastAdcIndexes () |
void | applyNewHardwareSettings () |
void | setBor (int borValue) |
void | boardInitHardwareEarly () |
void | boardInitHardware () |
void | boardInitHardwareExtra () |
void | initHardwareNoConfig () |
void | stopHardware () |
void | startHardware () |
PUBLIC_API_WEAK void | setPinConfigurationOverrides () |
void | initHardware () |
Variables | |
std::optional< setup_custom_board_overrides_type > | custom_board_InitHardwareEarly |
std::optional< setup_custom_board_overrides_type > | custom_board_InitHardware |
std::optional< setup_custom_board_overrides_type > | custom_board_InitHardwareExtra |
bool | isSpiInitialized [SPI_TOTAL_COUNT+1] |
static AdcToken | fastMapSampleIndex |
static AdcToken | triggerSampleIndex |
const I2CConfig | i2cfg |
void applyNewHardwareSettings | ( | ) |
this method is NOT currently invoked on ECU start todo: reduce code duplication by moving more logic into startHardware method
All 'stop' methods need to go before we begin starting pins.
We take settings from 'activeConfiguration' not 'engineConfiguration' while stopping hardware. Some hardware is restart unconditionally on change of parameters while for some systems we make extra effort and restart only relevant settings were changes.
Definition at line 311 of file hardware.cpp.
Referenced by incrementGlobalConfigurationVersion().
void boardInitHardware | ( | ) |
Definition at line 419 of file hardware.cpp.
Referenced by initHardware().
void boardInitHardwareEarly | ( | ) |
Definition at line 416 of file hardware.cpp.
Referenced by initHardwareNoConfig().
void boardInitHardwareExtra | ( | ) |
Definition at line 422 of file hardware.cpp.
Referenced by initHardware().
|
static |
Definition at line 296 of file hardware.cpp.
Referenced by applyNewHardwareSettings(), and initHardware().
brain_pin_e getMisoPin | ( | spi_device_e | device | ) |
Definition at line 86 of file hardware.cpp.
Referenced by printSpiConfig(), stopSpi(), and turnOnSpi().
brain_pin_e getMosiPin | ( | spi_device_e | device | ) |
Definition at line 106 of file hardware.cpp.
Referenced by printSpiConfig(), stopSpi(), and turnOnSpi().
brain_pin_e getSckPin | ( | spi_device_e | device | ) |
Definition at line 126 of file hardware.cpp.
Referenced by printSpiConfig(), stopSpi(), and turnOnSpi().
SPIDriver * getSpiDevice | ( | spi_device_e | spiDevice | ) |
Definition at line 149 of file hardware.cpp.
Referenced by initAccelerometer(), initializeMmcBlockDevice(), initPotentiometers(), initSmartGpio(), lockSpi(), nm_bus_init(), and unlockSpi().
void initHardware | ( | ) |
Definition at line 538 of file hardware.cpp.
Referenced by commonEarlyInit().
void initHardwareNoConfig | ( | ) |
histograms is a data structure for CPU monitor, it does not depend on configuration
We need the LED_ERROR pin even before we read configuration
Definition at line 427 of file hardware.cpp.
Referenced by runRusEfi().
|
static |
Definition at line 199 of file hardware.cpp.
Referenced by initHardware().
void lockSpi | ( | spi_device_e | device | ) |
Only one consumer can use SPI bus at a given time
Definition at line 190 of file hardware.cpp.
Referenced by sendToPot().
void onFastAdcComplete | ( | adcsample_t * | ) |
This method is not in the adc* lower-level file because it is more business logic then hardware.
this callback is executed 10 000 times a second, it needs to be as fast as possible
Definition at line 275 of file hardware.cpp.
Referenced by adc_callback(), and fastAdcDoneCB().
void printSpiConfig | ( | const char * | msg, |
spi_device_e | device | ||
) |
Definition at line 256 of file hardware.cpp.
Referenced by sdStatistics().
void setBor | ( | int | borValue | ) |
Definition at line 409 of file hardware.cpp.
PUBLIC_API_WEAK void setPinConfigurationOverrides | ( | void | ) |
Definition at line 528 of file hardware.cpp.
void startHardware | ( | ) |
This method is invoked both on ECU start and configuration change At the moment we have too many system which handle ECU start and configuration change separately TODO: move move hardware code here
Definition at line 503 of file hardware.cpp.
Referenced by applyNewHardwareSettings(), and initHardware().
void stopHardware | ( | ) |
Definition at line 478 of file hardware.cpp.
Referenced by applyNewHardwareSettings().
void stopSpi | ( | spi_device_e | device | ) |
Definition at line 220 of file hardware.cpp.
Referenced by stopSpiModules().
|
static |
Definition at line 230 of file hardware.cpp.
Referenced by applyNewHardwareSettings().
void unlockSpi | ( | spi_device_e | device | ) |
Definition at line 195 of file hardware.cpp.
Referenced by sendToPot().
std::optional<setup_custom_board_overrides_type> custom_board_InitHardware |
Definition at line 77 of file hardware.cpp.
Referenced by initHardware(), and setup_custom_board_overrides().
std::optional<setup_custom_board_overrides_type> custom_board_InitHardwareEarly |
Definition at line 76 of file hardware.cpp.
Referenced by initHardwareNoConfig().
std::optional<setup_custom_board_overrides_type> custom_board_InitHardwareExtra |
Definition at line 78 of file hardware.cpp.
Referenced by initHardware().
|
static |
Definition at line 266 of file hardware.cpp.
Referenced by calcFastAdcIndexes(), and onFastAdcComplete().
const I2CConfig i2cfg |
Definition at line 531 of file hardware.cpp.
Referenced by initHardware().
|
extern |
Definition at line 13 of file at32_spi.cpp.
Referenced by stopSpi(), and turnOnSpi().
|
static |
Definition at line 269 of file hardware.cpp.
Referenced by calcFastAdcIndexes(), and onFastAdcComplete().