33static constexpr uint8_t VERSION = 0x04;
37 return (block & 0b11111) << 3 | (write ? 1 << 2 : 0);
51constexpr static uint8_t CONFLICT = 1 << 7;
52constexpr static uint8_t UNREACH = 1 << 6;
53constexpr static uint8_t PPPOE = 1 << 5;
54constexpr static uint8_t MP = 1 << 4;
88constexpr static uint8_t SEND_OK = 1 << 4;
89constexpr static uint8_t TIMEOUT = 1 << 3;
90constexpr static uint8_t RECV = 1 << 2;
91constexpr static uint8_t DISCON = 1 << 1;
92constexpr static uint8_t CON = 1 << 0;
151inline uint8_t
buildModeUdp(
bool enable_multicast,
bool block_broadcast,
152 bool multicast_use_igmp_v1,
bool block_unicast)
154 return (enable_multicast ? 1 << 7 : 0) | (block_broadcast ? 1 << 6 : 0) |
155 (multicast_use_igmp_v1 ? 1 << 5 : 0) | (block_unicast ? 1 << 4 : 0) |
161 return (enable_no_delayed_ack ? 1 << 5 : 0) | 0b0001;
165 bool block_multicast,
bool block_ipv6)
167 return (enable_mac_filter ? 1 << 7 : 0) | (block_broadcast ? 1 << 6 : 0) |
168 (block_multicast ? 1 << 5 : 0) | (block_ipv6 ? 1 << 4 : 0) | 0b0100;
uint8_t buildModeTcp(bool enable_no_delayed_ack)
uint8_t buildModeMacraw(bool enable_mac_filter, bool block_broadcast, bool block_multicast, bool block_ipv6)
uint8_t buildModeUdp(bool enable_multicast, bool block_broadcast, bool multicast_use_igmp_v1, bool block_unicast)
uint8_t buildControlWord(uint8_t block, bool write)
uint8_t getSocketTxBlock(int n)
uint8_t getSocketRxBlock(int n)
uint8_t getSocketRegBlock(int n)
Driver for the VN100S IMU.