rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Functions | Variables
console_io.cpp File Reference

Detailed Description

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

This file is part of rusEfi - see http://rusefi.com

rusEFI can communicate with external universe via native USB or some sort of TTL mode We have an interesting situation with TTL communication channels, we have 1) SERIAL - this one was implemented first simply because the code was readily available (works on stm32) this one is most suitable for streaming HAL API this one is not great since each byte requires an IRQ and with enough IRQ delay we have a risk of data loss 2) UART DMA - the best one since FIFO buffer reduces data loss (works on stm32) We have two halves of DMA buffer - one is used for TTL while rusEFI prepares next batch of data in the other side. We need idle support in order to not wait for the complete buffer to get full in order to recieve a message. Back when we were implementing this STM32_DMA_CR_HTIE was not available in ChibiOS driver so we have added it. we have custom rusEFI changes to ChibiOS HAL driver v1 F7 uses driver v2 which currently does not have rusEFI changes. open question if fresh ChibiOS is better in this regard. 3) UART this one is useful on platforms with hardware FIFO buffer like Kinetis. stm32 does not have such buffer so for stm32 UART without DMA has no advantages

rusEfi is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

rusEfi is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file console_io.cpp.

Functions

void onDataArrived (bool valid)
 
void startConsole (CommandHandler console_line_callback_p)
 

Variables

bool consoleByteArrived = false
 
CommandHandler console_line_callback
 

Function Documentation

◆ onDataArrived()

void onDataArrived ( bool  valid)

Definition at line 49 of file console_io.cpp.

49 {
50 consoleByteArrived = valid;
51}
bool consoleByteArrived

Referenced by TunerstudioThread::ThreadTask().

Here is the caller graph for this function:

◆ startConsole()

void startConsole ( CommandHandler  console_line_callback_p)

Definition at line 55 of file console_io.cpp.

55 {
56 console_line_callback = console_line_callback_p;
57}
CommandHandler console_line_callback

Referenced by initializeConsole().

Here is the caller graph for this function:

Variable Documentation

◆ console_line_callback

CommandHandler console_line_callback

Definition at line 53 of file console_io.cpp.

Referenced by TunerStudio::handleExecuteCommand(), and startConsole().

◆ consoleByteArrived

bool consoleByteArrived = false

Definition at line 47 of file console_io.cpp.

Referenced by onDataArrived().

Go to the source code of this file.