20 lines
544 B
C++
20 lines
544 B
C++
#ifndef ES_SERIAL_PROTO_PARAMS_H_GUARD
|
|
#define ES_SERIAL_PROTO_PARAMS_H_GUARD
|
|
|
|
#include <cstdint>
|
|
|
|
namespace es
|
|
{
|
|
namespace Serial
|
|
{
|
|
namespace Proto
|
|
{
|
|
constexpr size_t MAX_RAW_PACKET_SIZE = 32;
|
|
constexpr size_t HEADER_SIZE = 1;
|
|
constexpr size_t MAX_PAYLOAD = MAX_RAW_PACKET_SIZE - HEADER_SIZE; // 31
|
|
constexpr uint8_t CRC4_POLY = 0x13; // 0b1_0011 (x^4 + x + 1)
|
|
} // namespace Proto
|
|
} // namespace Serial
|
|
} // namespace es
|
|
|
|
#endif |