Expand description
Asynchronous Serial Host version 2 (ASHv2)
This library implements the Asynchronous Serial Host version 2, ASHv2 for short.
You can find the protocol’s definition on siliconlabs.com.
This library is free software and is not affiliated with Silicon Labs.
Modules§
- headers
- Header types for frames that do not have a constant header value.
Structs§
- Ack
- Acknowledgement (
ACK) frame. - Data
- A data frame.
- Error
- Error frame.
- Frame
Buffer - A buffer for reading and writing ASH frames.
- HexSlice
- A wrapper around a slice of bytes to format it with hexadecimal bytes.
- Nak
- Negative Acknowledgement (
NAK) frame. - Rst
- Requests the NCP to perform a software reset (valid even if the NCP is in the FAILED state).
- RstAck
- A reset acknowledgment (
RST_ACK) frame. - Transceiver
ASHv2transceiver.- Wrapping
U3 - A three bit number.
Enums§
- Baud
Rate - Available baud rates that the NCP can operate on.
- Code
- Reset and error codes.
- Control
Byte - Control bytes used in the
ASHv2protocol. - Frame
- Available frame types.
- Status
ASHv2connection status.
Constants§
- CRC
- CRC-16-IBM-3740 checksum function.
- MAX_
FRAME_ SIZE - In the wost-case, all frame bytes are stuffed (*2) and we append the FLAG byte (+1).
- MAX_
PAYLOAD_ SIZE - The maximum payload size of an
ASHv2DATAframe. - MIN_
PAYLOAD_ SIZE - The minimum payload size of an
ASHv2DATAframe.
Traits§
- Mask
- Mask bytes with pseudo-random numbers.
- Stuffing
- Stuff and un-stuff bytes.
- Validate
- A trait for checksum based data validation.
Functions§
- open
- Opens a serial port depending on the local operating system.