Speeduino
Loading...
Searching...
No Matches
comms.h
Go to the documentation of this file.
1
10#ifndef COMMS_H
11#define COMMS_H
12
13#if defined(CORE_TEENSY)
14 #define BLOCKING_FACTOR 251
15 #define TABLE_BLOCKING_FACTOR 256
16#elif defined(CORE_STM32)
17 #define BLOCKING_FACTOR 121
18 #define TABLE_BLOCKING_FACTOR 64
19#elif defined(CORE_AVR)
20 #define BLOCKING_FACTOR 121
21 #define TABLE_BLOCKING_FACTOR 64
22#endif
23
25#define primarySerial (*pPrimarySerial)
26
28
33void serialReceive(void);
34
37void serialTransmit(void);
38
43bool isRxTimeout(void);
44
45#endif // COMMS_H
static uint32_t rshift(uint32_t a)
Bitwise right shift - generic, unoptimized, case.
Definition bit_shifts.h:349
uint32_t serialReceiveStartTime
The time in milliseconds at which the serial receive started. Used for calculating whether a timeout ...
Definition comms.cpp:84
void serialReceive(void)
The serial receive pump. Should be called whenever the serial port has data available to read.
Definition comms.cpp:465
Stream * pPrimarySerial
Definition comms.cpp:104
void serialTransmit(void)
The serial transmit pump. Should be called when serialStatusFlag indicates a transmit operation is in...
Definition comms.cpp:549
bool isRxTimeout(void)
Checks whether the current serial command should be timed out.
Definition comms.cpp:113