1 /* 2 * Copyright (c) 2022 Rodrigo Peixoto <rodrigopex@gmail.com> 3 * SPDX-License-Identifier: Apache-2.0 4 */ 5 #ifndef _ZBUS_MESSAGES_H_ 6 #define _ZBUS_MESSAGES_H_ 7 #include <stdbool.h> 8 #include <stddef.h> 9 #include <stdint.h> 10 11 struct version_msg { 12 uint8_t major; 13 uint8_t minor; 14 uint16_t build; 15 }; 16 17 struct sensor_data_msg { 18 int a; 19 int b; 20 }; 21 22 struct net_pkt_msg { 23 char x; 24 bool y; 25 }; 26 27 struct action_msg { 28 bool status; 29 }; 30 31 struct s1_msg { 32 int m; 33 struct { 34 int a, b, c; 35 } field; 36 }; 37 38 struct hard_msg { 39 int16_t range; /* Range 0 to 1023 */ 40 uint8_t binary; /* Range 0 to 1 */ 41 int16_t *pointer; /* Not null */ 42 }; 43 44 #endif /* _ZBUS_MESSAGES_H_ */ 45