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

Detailed Description

SERIAL bus low level code.

Date
Apr 17, 2020
Author
Konstantin Smola, (c) 2020

Definition in file serial_hw.h.

Functions

void initAuxSerial (void)
 
void stopAuxSerialPins ()
 
void startAuxSerialPins ()
 
void enableAuxSerial ()
 

Function Documentation

◆ enableAuxSerial()

void enableAuxSerial ( )

Definition at line 35 of file serial_hw.cpp.

35  {
37  sdStart(AUX_SERIAL_DEVICE, &uartCfg);
38 
39  efiPrintf("AUX Serial started");
40 }
engine_configuration_s * engineConfiguration
static SerialConfig uartCfg
Definition: serial_hw.cpp:22

Referenced by startAuxSerialPins().

Here is the caller graph for this function:

◆ initAuxSerial()

void initAuxSerial ( void  )

Definition at line 56 of file serial_hw.cpp.

56  {
57  addConsoleAction("auxinfo", auxInfo);
58 
61 
63  isSerialRXEnabled || // we need at least one pin set
65 
66  // exit if no pin is configured
67  if (!isSerialEnabled)
68  return;
69 
70  // Validate pins
72  criticalError("unexpected aux TX pin");
73  return;
74  }
75 
77  criticalError("unexpected aux RX pin");
78  return;
79  }
80 
82 
84  serialRead.start();
85 }
void start()
Start the thread.
void addConsoleAction(const char *token, Void callback)
Register console action without parameters.
bool isValidSerialRxPin(brain_pin_e pin)
bool isValidSerialTxPin(brain_pin_e pin)
bool isBrainPinValid(brain_pin_e brainPin)
static void auxInfo()
Definition: serial_hw.cpp:25
static SerialRead serialRead
Definition: serial_hw.cpp:23
static bool isSerialEnabled
Definition: serial_hw.cpp:18
static bool isSerialTXEnabled
Definition: serial_hw.cpp:19
static bool isSerialRXEnabled
Definition: serial_hw.cpp:20
void startAuxSerialPins()
Definition: serial_hw.cpp:47

Referenced by initHardware().

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

◆ startAuxSerialPins()

void startAuxSerialPins ( )

Definition at line 47 of file serial_hw.cpp.

47  {
49  efiSetPadMode("AuxSerial TX", engineConfiguration->auxSerialTxPin, PAL_MODE_ALTERNATE(8));
51  efiSetPadMode("AuxSerial RX", engineConfiguration->auxSerialRxPin, PAL_MODE_ALTERNATE(8));
52 
54 }
void efiSetPadMode(const char *msg, brain_pin_e brainPin, iomode_t mode)
void enableAuxSerial()
Definition: serial_hw.cpp:35

Referenced by applyNewHardwareSettings(), and initAuxSerial().

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

◆ stopAuxSerialPins()

void stopAuxSerialPins ( )

Definition at line 42 of file serial_hw.cpp.

42  {
45 }
engine_configuration_s & activeConfiguration
void efiSetPadUnused(brain_pin_e brainPin)
Definition: io_pins.cpp:20

Referenced by applyNewHardwareSettings().

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

Go to the source code of this file.