#include "SFBConstants.h"
#include "SFBAlarm.h"
#include "SFBReactor.h"
#include "SFBHWSerial.h"
#include "SFBPrint.h"
Go to the source code of this file.
Data Structures | |
class | SFBSerial |
A serial communications "endpoint", implementing the SFB packet protocol, including baud rate negotiation (BRN). More... | |
Defines | |
#define | NorthFace Faces[NORTH] |
The SFBSerial object representing the NORTH face. | |
#define | SouthFace Faces[SOUTH] |
The SFBSerial object representing the SOUTH face. | |
#define | EastFace Faces[EAST] |
The SFBSerial object representing the EAST face. | |
#define | WestFace Faces[WEST] |
The SFBSerial object representing the WEST face. | |
#define | Serial NorthFace |
An alias for NorthFace, for Arduino compatibility. | |
#define | Serial1 SouthFace |
An alias for SouthFace, for Arduino Mega compatibility. | |
#define | Serial2 EastFace |
An alias for EastFace, for Arduino Mega compatibility. | |
#define | Serial3 WestFace |
An alias for WestFace, for Arduino Mega compatibility. | |
Enumerations | |
enum | StandardBaudRateCodes { SFBAUD300 = 0, SFBAUD1200 = 1, SFBAUD9600 = 2, SFBAUD57600 = 3, SFBAUD115200 = 4, SFBAUD230400 = 5, SFBAUD500000 = 6, SFBAUD1000000 = 7, SFBAUD2000000 = 8, SFBAUD3000000 = 9, SFBAUD_CODE_COUNT = 10, SFBAUD_RENDEZVOUS = 2 } |
Single digit numeric codes for the "standard baud rates" for interSFB communications. More... | |
Functions | |
int | getStandardBaudCode (u32 baudCodeOrRate) |
What standard baud code does baudCodeOrRate correspond to, if any? | |
u32 | getStandardBaudRate (u32 baudCode) |
What is the baud rate associated with standard baud code baudCode? | |
void | serial_startup_initialization () |
bool | zPacketPrefix (u8 *p1, const char *to) |
bool | packetPrefix (u8 *p1, const u8 *to, const u32 len) |
Variables | |
SFBSerial | Faces [FACE_COUNT] |
The array of SFBSerial objects. |
Single digit numeric codes for the "standard baud rates" for interSFB communications.
Although the SFB serial hardware and software is capable of communicating at a wide range of standard and non-standard baud rates (see begin(int,bool)), only the rates described here are used in the "SB" and "SS" packets sent between SFB's during the "baud rate negotiation" (BRN) protocol, and thus only one of these rates can be selected by that process.
SFBAUD300 | 300 baud. |
SFBAUD1200 | 1200 baud. |
SFBAUD9600 | 9600 baud; the "rendezvous rate" (see SFBAUD_RENDEZVOUS). |
SFBAUD57600 | 57600 baud. |
SFBAUD115200 | 115200 baud; a common rate for communications between SFBs. |
SFBAUD230400 | 230400 baud; often achievable by SFBs (depending on interrupt load). |
SFBAUD500000 | 500000 baud; may be achievable by SFBs, but usually not reliable. |
SFBAUD1000000 | 1000000 baud; future use; unachievable by existing SFBs. |
SFBAUD2000000 | 2000000 baud; future use; unachievable by existing SFBs. |
SFBAUD3000000 | 3000000 baud; future use; unachievable by existing SFBs. |
SFBAUD_CODE_COUNT | The number of possible SFB BRN baud codes. |
SFBAUD_RENDEZVOUS |
Code 2 (SFBAUD9600) is the "rendezvous speed" used for initial interSFB communications.
The baud rade indicated by this code must be supported by every "SFB-communications-aware" device. (On the other hand, it is the _only_ baud rate that is so required; support for any of the other baud rate codes is optional.) |
int getStandardBaudCode | ( | u32 | baudCodeOrRate | ) |
What standard baud code does baudCodeOrRate correspond to, if any?
What is the baud rate associated with standard baud code baudCode?