#include <serialrx.h>
Public Member Functions | |
void | SetBaudRate (SystemClockOffset baud) |
void | SetHexOutput (bool newValue) |
SerialRxBasic () | |
void | Reset () |
virtual Pin * | GetPin (const char *name) |
virtual | ~SerialRxBasic () |
virtual int | Step (bool &trueHwStep, SystemClockOffset *timeToNextStepIn_ns=0) |
Return nonzero if a breakpoint was hit. | |
Protected Types | |
enum | T_RxState { RX_WAIT_LOWEDGE, RX_READ_STARTBIT, RX_READ_DATABIT_START, RX_READ_DATABIT_FIRST, RX_READ_DATABIT_SECOND, RX_READ_DATABIT_THIRD } |
Protected Member Functions | |
void | PinStateHasChanged (Pin *) |
virtual void | CharReceived (unsigned char c)=0 |
Protected Attributes | |
Pin | rx |
std::map< std::string, Pin * > | allPins |
unsigned long long | baudrate |
int | highCnt |
int | bitCnt |
int | maxBitCnt |
int | dataByte |
T_RxState | rxState |
bool | sendInHex |
Definition at line 34 of file serialrx.h.
enum SerialRxBasic::T_RxState [protected] |
RX_WAIT_LOWEDGE | |
RX_READ_STARTBIT | |
RX_READ_DATABIT_START | |
RX_READ_DATABIT_FIRST | |
RX_READ_DATABIT_SECOND | |
RX_READ_DATABIT_THIRD |
Definition at line 49 of file serialrx.h.
SerialRxBasic::SerialRxBasic | ( | ) |
Definition at line 32 of file serialrx.cpp.
References allPins, Pin::RegisterCallback(), Reset(), rx, and sendInHex.
virtual SerialRxBasic::~SerialRxBasic | ( | ) | [inline, virtual] |
Definition at line 68 of file serialrx.h.
virtual void SerialRxBasic::CharReceived | ( | unsigned char | c | ) | [protected, pure virtual] |
Implemented in SerialRxBuffered, and SerialRx.
Referenced by Step().
Pin * SerialRxBasic::GetPin | ( | const char * | name | ) | [virtual] |
Definition at line 54 of file serialrx.cpp.
References allPins.
void SerialRxBasic::PinStateHasChanged | ( | Pin * | p | ) | [protected, virtual] |
Implements HasPinNotifyFunction.
Definition at line 39 of file serialrx.cpp.
References SystemClock::Add(), SystemClock::Instance(), RX_READ_STARTBIT, RX_WAIT_LOWEDGE, and rxState.
void SerialRxBasic::Reset | ( | void | ) |
Definition at line 48 of file serialrx.cpp.
References baudrate, maxBitCnt, RX_WAIT_LOWEDGE, and rxState.
Referenced by SerialRx::SerialRx(), and SerialRxBasic().
void SerialRxBasic::SetBaudRate | ( | SystemClockOffset | baud | ) |
Definition at line 120 of file serialrx.cpp.
References baudrate.
void SerialRxBasic::SetHexOutput | ( | bool | newValue | ) |
Definition at line 124 of file serialrx.cpp.
References sendInHex.
int SerialRxBasic::Step | ( | bool & | trueHwStep, | |
SystemClockOffset * | timeToNextStepIn_ns = 0 | |||
) | [virtual] |
Return nonzero if a breakpoint was hit.
Implements SimulationMember.
Definition at line 58 of file serialrx.cpp.
References baudrate, bitCnt, CharReceived(), dataByte, highCnt, maxBitCnt, rx, RX_READ_DATABIT_FIRST, RX_READ_DATABIT_SECOND, RX_READ_DATABIT_THIRD, RX_READ_STARTBIT, RX_WAIT_LOWEDGE, and rxState.
std::map< std::string, Pin *> SerialRxBasic::allPins [protected] |
Definition at line 37 of file serialrx.h.
Referenced by GetPin(), and SerialRxBasic().
unsigned long long SerialRxBasic::baudrate [protected] |
Definition at line 38 of file serialrx.h.
Referenced by Reset(), SetBaudRate(), and Step().
int SerialRxBasic::bitCnt [protected] |
Definition at line 45 of file serialrx.h.
Referenced by Step().
int SerialRxBasic::dataByte [protected] |
Definition at line 47 of file serialrx.h.
Referenced by Step().
int SerialRxBasic::highCnt [protected] |
Definition at line 43 of file serialrx.h.
Referenced by Step().
int SerialRxBasic::maxBitCnt [protected] |
Definition at line 46 of file serialrx.h.
Pin SerialRxBasic::rx [protected] |
Definition at line 36 of file serialrx.h.
Referenced by SerialRx::SerialRx(), SerialRxBasic(), and Step().
T_RxState SerialRxBasic::rxState [protected] |
Definition at line 58 of file serialrx.h.
Referenced by PinStateHasChanged(), Reset(), and Step().
bool SerialRxBasic::sendInHex [protected] |
Definition at line 60 of file serialrx.h.
Referenced by SerialRx::CharReceived(), SerialRxBasic(), and SetHexOutput().