rusEFI
The most advanced open source ECU
Functions
rusefi.h File Reference

Detailed Description

Date
Dec 25, 2013
Author
Andrey Belomutskiy, (c) 2012-2020

Definition in file rusefi.h.

Functions

__NO_RETURN void runRusEfi ()
 
__NO_RETURN void rebootNow ()
 
void preHalInit ()
 

Function Documentation

◆ preHalInit()

void preHalInit ( )

Definition at line 19 of file board_configuration.cpp.

19  {
20  efiSetPadMode("Ethernet", Gpio::A1, PAL_MODE_ALTERNATE(0xb));
21  efiSetPadMode("Ethernet", Gpio::A2, PAL_MODE_ALTERNATE(0xb));
22  efiSetPadMode("Ethernet", Gpio::A7, PAL_MODE_ALTERNATE(0xb));
23 
24  efiSetPadMode("Ethernet", Gpio::B13, PAL_MODE_ALTERNATE(0xb));
25 
26  efiSetPadMode("Ethernet", Gpio::C1, PAL_MODE_ALTERNATE(0xb));
27  efiSetPadMode("Ethernet", Gpio::C4, PAL_MODE_ALTERNATE(0xb));
28  efiSetPadMode("Ethernet", Gpio::C5, PAL_MODE_ALTERNATE(0xb));
29 
30  efiSetPadMode("Ethernet", Gpio::G11, PAL_MODE_ALTERNATE(0xb));
31  efiSetPadMode("Ethernet", Gpio::G13, PAL_MODE_ALTERNATE(0xb));
32 }
void efiSetPadMode(const char *msg, brain_pin_e brainPin, iomode_t mode)

Referenced by main().

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

◆ rebootNow()

__NO_RETURN void rebootNow ( )

Definition at line 150 of file rusefi.cpp.

150  {
151  NVIC_SystemReset();
152 }

Referenced by executeTSCommand(), and scheduleReboot().

Here is the caller graph for this function:

◆ runRusEfi()

__NO_RETURN void runRusEfi ( )

we need to initialize table objects before default configuration can set values

Next we should initialize serial port console, it's important to know what's going on

Definition at line 29 of file egt2can.cpp.

29  {
30 
31 #if defined(EFI_CONSOLE_SERIAL_DEVICE)
32  /*
33  * Activates the serial driver 1 using the driver default configuration.
34  * PA9 and PA10 are routed to USART1.
35  */
36  sdStart(&SD1, NULL);
37  palSetPadMode(GPIOA, 9, PAL_MODE_ALTERNATE(1)); /* USART1 TX. */
38  palSetPadMode(GPIOA, 10, PAL_MODE_ALTERNATE(1)); /* USART1 RX. */
39 #endif
40 
41  /*
42  * Creates the blinker threads.
43  */
44  chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
45 
47 
48  /*
49  * Normal main() thread activity, in this demo it does nothing except
50  * sleeping in a loop and check the button state, when the button is
51  * pressed the test procedure is launched with output on the serial
52  * driver 1.
53  */
54  while (true) {
55 // if (palReadPad(GPIOA, GPIOA_BUTTON))
56 // TestThread(&SD1);
57  chThdSleepMilliseconds(50);
58 
59 // printPending();
60  }
61 
62 
63 }
static msg_t Thread1(void *arg)
Definition: egt2can.cpp:16
egt_cs_array_t max31855_cs
Definition: egt2can.cpp:7
void initMax3185x(spi_device_e device, egt_cs_array_t max31855_cs)
Definition: max3185x.cpp:468

Referenced by main().

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

Go to the source code of this file.