Firmware  0.4.1
Loading...
Searching...
No Matches
mw::zimo::ulf::decup_ein Namespace Reference

Namespaces

namespace  anonymous_namespace{task_function.cpp}
 

Classes

class  Decup
 Receiver. More...
 

Functions

 SHARED_TASK (task, "mw::zimo::ulf::decup_ein", intf::usb::rx_task.priority - 1u, APP_CPU_NUM, drv::out::track::zimo::decup::task.timeout)
 
void task_function (void *)
 ULF_DECUP_EIN task function.
 

Function Documentation

◆ SHARED_TASK()

mw::zimo::ulf::decup_ein::SHARED_TASK ( task ,
"mw::zimo::ulf::decup_ein" ,
intf::usb::rx_task.priority - 1u,
APP_CPU_NUM ,
drv::out::track::zimo::decup::task. timeout )
inline

◆ task_function()

void mw::zimo::ulf::decup_ein::task_function ( void * )

This task is created by the USB receive task when a DECUP_EIN\r protocol string is received. Unfortunately, the protocol itself is stateful and requires its own receiver class. An instance of this receiver on the stack takes care of decoding the raw USB data to DECUP packets. Those packets are then transmitted to drv::out::tx_message_buffer.

A special feature of this protocol is that the RTS line is used to switch the track voltage on and off. For this reason, the RTS line is monitored and its state is stored in a global variable intf::usb::rts.

At the end of an upload, the USB receive task is created and this task destroys itself.