Go to the source code of this file.
|
enum | _RAK_PROTO_STATE {
RAK_PROTO_STATE_DEFAULT = 0,
RAK_PROTO_STATE_RECV_DELIMITER = 1,
RAK_PROTO_STATE_RECV_LEN_1 = 2,
RAK_PROTO_STATE_RECV_LEN_2 = 3,
RAK_PROTO_STATE_RECV_FRAME_TYPE = 4,
RAK_PROTO_STATE_RECV_FLAG = 5,
RAK_PROTO_STATE_RECV_PAYLOAD = 6,
RAK_PROTO_STATE_RECV_CHKSUM = 7,
RAK_PROTO_STATE_RECV_CRC_1 = 8,
RAK_PROTO_STATE_RECV_CRC_2 = 9,
RAK_PROTO_STATE_RECV_CRC_3 = 10,
RAK_PROTO_STATE_RECV_CRC_4 = 11,
RAK_PROTO_STATE_CRC_ERROR = 12,
RAK_PROTO_STATE_MAX = 13
} |
|
enum | _RAK_PROTO_EVENT {
RAK_PROTO_EVENT_RECV_A_NORMAL_CHAR = 0,
RAK_PROTO_EVENT_RECV_THE_DELIMITER = 1,
RAK_PROTO_EVENT_MAX = 2
} |
|
◆ RAK_PROTO_BUFFER_SIZE
#define RAK_PROTO_BUFFER_SIZE (256) |
◆ RAK_PROTO_START_DELIMITER
#define RAK_PROTO_START_DELIMITER 0x7E |
◆ RAK_PROTO_UPPER_LAYER_NUM_MAX
#define RAK_PROTO_UPPER_LAYER_NUM_MAX 256 |
◆ RAK_PROTO_PKT_TIMEOUT
#define RAK_PROTO_PKT_TIMEOUT (3000) |
◆ BYTESWAP32
#define BYTESWAP32 |
( |
|
z | ) |
((uint32_t)((z&0xFF)<<24|((z>>8)&0xFF)<<16|((z>>16)&0xFF)<<8|((z>>24)&0xFF))) |
◆ BYTESWAP16
#define BYTESWAP16 |
( |
|
z | ) |
((uint16_t)((z&0xFF)<<8|((z>>8)&0xFF))) |
◆ BITS_PER_U8
#define BITS_PER_U8 |
( |
|
x | ) |
(bits_per_nibble[(x) & 0xf] + bits_per_nibble[((x) >> 4) & 0xf]) |
◆ BITS_PER_U16
#define BITS_PER_U16 |
( |
|
x | ) |
(BITS_PER_U8((x) & 0xff) + BITS_PER_U8(((x) >> 8) & 0xff)) |
◆ BITS_PER_U32
#define BITS_PER_U32 |
( |
|
x | ) |
(BITS_PER_U16((x) & 0xffff) + BITS_PER_U16(((x) >> 16) & 0xffff)) |
◆ PROTO_USE_POPCOUNT_CHKSUM
#define PROTO_USE_POPCOUNT_CHKSUM |
◆ RAK_PROTO_FLAG_RESPONSE
#define RAK_PROTO_FLAG_RESPONSE 0x01 |
◆ RAK_PROTO_HANDLER
typedef void(* RAK_PROTO_HANDLER) (uint8_t *, uint16_t) |
◆ rak_proto_upper_layer_info
◆ RAK_PROTO_STATE
◆ RAK_PROTO_EVENT
◆ rak_proto_event_handler
◆ rak_proto_arrived_packet_info
◆ _RAK_PROTO_STATE
Enumerator |
---|
RAK_PROTO_STATE_DEFAULT | |
RAK_PROTO_STATE_RECV_DELIMITER | |
RAK_PROTO_STATE_RECV_LEN_1 | |
RAK_PROTO_STATE_RECV_LEN_2 | |
RAK_PROTO_STATE_RECV_FRAME_TYPE | |
RAK_PROTO_STATE_RECV_FLAG | |
RAK_PROTO_STATE_RECV_PAYLOAD | |
RAK_PROTO_STATE_RECV_CHKSUM | |
RAK_PROTO_STATE_RECV_CRC_1 | |
RAK_PROTO_STATE_RECV_CRC_2 | |
RAK_PROTO_STATE_RECV_CRC_3 | |
RAK_PROTO_STATE_RECV_CRC_4 | |
RAK_PROTO_STATE_CRC_ERROR | |
RAK_PROTO_STATE_MAX | |
◆ _RAK_PROTO_EVENT
Enumerator |
---|
RAK_PROTO_EVENT_RECV_A_NORMAL_CHAR | |
RAK_PROTO_EVENT_RECV_THE_DELIMITER | |
RAK_PROTO_EVENT_MAX | |
◆ __attribute__()
◆ start_delimiter
◆ length
◆ frame_type
◆ flag
◆ chksum