Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Vladislav Rykov
gateway_protocol
Commits
e1e8ab40
Commit
e1e8ab40
authored
Mar 25, 2020
by
vladislav
Browse files
unknown p_type + extern C
parent
3d9709f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
gateway_protocol/gateway_protocol.c
View file @
e1e8ab40
#include <gateway_protocol.h>
#include <gateway_protocol
/gateway_protocol
.h>
void
gateway_protocol_packet_encode
(
...
...
gateway_protocol/gateway_protocol.h
View file @
e1e8ab40
...
...
@@ -6,13 +6,18 @@
#define GATEWAY_PROTOCOL_PACKET_SIZE_MAX 128
#ifdef __cplusplus
extern
"C"
{
#endif
typedef
enum
{
GATEWAY_PROTOCOL_PACKET_TYPE_DATA_SEND
=
0x00
,
GATEWAY_PROTOCOL_PACKET_TYPE_PEND_REQ
=
0x04
,
GATEWAY_PROTOCOL_PACKET_TYPE_PEND_SEND
=
0x05
,
GATEWAY_PROTOCOL_PACKET_TYPE_STAT
=
0x10
,
GATEWAY_PROTOCOL_PACKET_TYPE_TIME_REQ
=
0x20
,
GATEWAY_PROTOCOL_PACKET_TYPE_TIME_SEND
=
0x21
GATEWAY_PROTOCOL_PACKET_TYPE_TIME_SEND
=
0x21
,
GATEWAY_PROTOCOL_PACKET_TYPE_UNKNOWN
=
0xFF
}
gateway_protocol_packet_type_t
;
typedef
enum
{
...
...
@@ -37,4 +42,8 @@ uint8_t gateway_protocol_packet_decode (
const
uint8_t
packet_length
,
const
uint8_t
*
packet
);
#ifdef __cplusplus
}
#endif
#endif // __GATEWAY_PROTOCOL_H__
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment