We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 69dfdf6 commit ea82312Copy full SHA for ea82312
Inc/tuk/can_wrapper/can_message.h
@@ -43,17 +43,17 @@ typedef struct
43
// switches to a big-endian processor, that subsystem will have to perform a
44
// byte swap of the message contents.
45
46
-// Example Usage: float arg = GET_MSG_DATA(msg, 0, float);
47
-#define GET_MSG_DATA(msg, pos, type) ({ \
+// Example Usage: float arg = GET_MSG_DATA(msg.body, 0, float);
+#define GET_MSG_DATA(body, pos, type) ({ \
48
type var; \
49
- memcpy(&var, &msg.body[pos], sizeof(var)); \
+ memcpy(&var, &body[pos], sizeof(var)); \
50
var; \
51
})
52
53
-// Example Usage: SET_MSG_DATA(msg, 0, uint8_t, 32);
54
-#define SET_MSG_DATA(msg, pos, type, value) do { \
+// Example Usage: SET_MSG_DATA(byte_array, 0, uint8_t, 29);
+#define SET_MSG_DATA(body, pos, type, value) do { \
55
type var = value; \
56
- memcpy(&msg.body[pos], &var, sizeof(var)); \
+ memcpy(&body[pos], &var, sizeof(var)); \
57
} while (0)
58
59
#endif /* CAN_WRAPPER_MODULE_INC_CAN_MESSAGE_H_ */
0 commit comments