|
BNO08x Driver
API reference
|
Classes | |
| class | FrameDecoder |
| Byte-at-a-time decoder for frames received from the hub. More... | |
Functions | |
| constexpr std::size_t | MaxEncodedSize (std::size_t payloadLen) noexcept |
Largest frame EncodeFrame() can produce for payloadLen bytes (every byte escaped). | |
| std::size_t | EncodeFrame (const uint8_t *shtp, std::size_t len, uint8_t *out, std::size_t cap) noexcept |
| Wrap one SHTP transfer (header included) in a UART-SHTP frame. | |
Variables | |
| constexpr uint32_t | BAUD_RATE = 3000000 |
| UART-SHTP line rate: 3 Mbit/s, 8 data bits, no parity, 1 stop bit (datasheet 1.2.3.1). | |
| constexpr uint32_t | HOST_BYTE_GAP_US = 100 |
| Minimum spacing between bytes sent from the host to the hub, in µs (datasheet 1.2.3.1). | |
| constexpr uint8_t | FLAG = 0x7E |
| Frame delimiter. | |
| constexpr uint8_t | ESCAPE = 0x7D |
| Escape: the next byte is XOR ESCAPE_XOR. | |
| constexpr uint8_t | ESCAPE_XOR = 0x20 |
| Value XORed into an escaped byte. | |
| constexpr uint8_t | PROTOCOL_CONTROL = 0x00 |
| Protocol ID of control frames (BSQ / BSN). | |
| constexpr uint8_t | PROTOCOL_SHTP = 0x01 |
| Protocol ID of SHTP transfers. | |
| constexpr uint8_t | BUFFER_STATUS_QUERY [3] = {FLAG, PROTOCOL_CONTROL, FLAG} |
| Buffer Status Query, ready to send. | |
|
inlinenoexcept |
Wrap one SHTP transfer (header included) in a UART-SHTP frame.
| [in] | shtp | The transfer, as the SH-2 library passes it to Write(). |
| [in] | len | Its length in bytes. |
| [out] | out | Destination buffer. |
| [in] | cap | Size of out; MaxEncodedSize(len) always fits. |
out, or 0 if they do not fit.
|
constexprnoexcept |
Largest frame EncodeFrame() can produce for payloadLen bytes (every byte escaped).
|
inlineconstexpr |
UART-SHTP line rate: 3 Mbit/s, 8 data bits, no parity, 1 stop bit (datasheet 1.2.3.1).
|
inlineconstexpr |
Buffer Status Query, ready to send.
|
inlineconstexpr |
Escape: the next byte is XOR ESCAPE_XOR.
|
inlineconstexpr |
Value XORed into an escaped byte.
|
inlineconstexpr |
Frame delimiter.
|
inlineconstexpr |
Minimum spacing between bytes sent from the host to the hub, in µs (datasheet 1.2.3.1).
|
inlineconstexpr |
Protocol ID of control frames (BSQ / BSN).
|
inlineconstexpr |
Protocol ID of SHTP transfers.