File CdcUartTunnel.cpp
FileList > fw > rbcx-coprocessor > src > CdcUartTunnel.cpp
Go to the source code of this file.
#include "stm32f1xx_hal.h"
#include "stm32f1xx_hal_dma.h"
#include "stm32f1xx_ll_rcc.h"
#include "stm32f1xx_ll_usart.h"
#include "FreeRTOS.h"
#include "Bsp.hpp"
#include "CdcUartTunnel.hpp"
#include "UsbCdcLink.h"
#include "utils/BasePriorityRaiser.hpp"
#include "utils/ByteFifo.hpp"
#include "utils/HalDma.hpp"
Public Static Attributes
Type | Name |
---|---|
DMA_HandleTypeDef | dmaRxHandle |
DMA_HandleTypeDef | dmaTxHandle |
ByteFifo< 512 > | rxFifo |
std::array< uint8_t, CDC_DATA_SZ > | txBuf |
BasePriorityRaiser< usbLpIRQnPrio > | usbIrqPrioRaise |
Public Functions
Type | Name |
---|---|
bool | tunnelOnSetLineCodingInIrq (const usb_cdc_line_coding & old, const usb_cdc_line_coding & current) |
void | tunnelPoll () |
void | tunnelUartInit () |
Public Static Functions
Type | Name |
---|---|
void | tunnelDownstreamHandler () |
void | tunnelUartRxPoll () |
void | tunnelUartTx (uint8_t * data, size_t len) |
bool | tunnelUartTxReady () |
void | tunnelUpstreamHandler () |
Public Static Attributes Documentation
variable dmaRxHandle
DMA_HandleTypeDef dmaRxHandle;
Implements passthrough between the "tunnel" UART and USB CDC. "Tunnel" UART leads to ESP32 main UART.
variable dmaTxHandle
DMA_HandleTypeDef dmaTxHandle;
variable rxFifo
ByteFifo<512> rxFifo;
variable txBuf
std::array<uint8_t, CDC_DATA_SZ> txBuf;
variable usbIrqPrioRaise
BasePriorityRaiser<usbLpIRQnPrio> usbIrqPrioRaise;
Public Functions Documentation
function tunnelOnSetLineCodingInIrq
bool tunnelOnSetLineCodingInIrq (
const usb_cdc_line_coding & old,
const usb_cdc_line_coding & current
)
function tunnelPoll
void tunnelPoll ()
function tunnelUartInit
void tunnelUartInit ()
Public Static Functions Documentation
function tunnelDownstreamHandler
static void tunnelDownstreamHandler ()
function tunnelUartRxPoll
static void tunnelUartRxPoll ()
function tunnelUartTx
static void tunnelUartTx (
uint8_t * data,
size_t len
)
function tunnelUartTxReady
static bool tunnelUartTxReady ()
function tunnelUpstreamHandler
static void tunnelUpstreamHandler ()
The documentation for this class was generated from the following file fw/rbcx-coprocessor/src/CdcUartTunnel.cpp