Skip to content

Commit d0c8ad7

Browse files
committed
STM-can-api: Support reading of remote_msg
- Previously a received msg was fixed of data_type
1 parent 13b6633 commit d0c8ad7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

targets/TARGET_STM/can_api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ int can_read(can_t *obj, CAN_Message *msg, int handle)
405405
msg->format = CANExtended;
406406
}
407407
msg->id = RxHeader.Identifier;
408-
msg->type = CANData;
408+
msg->type = (RxHeader.RxFrameType == FDCAN_DATA_FRAME) ? CANData : CANRemote;
409409
msg->len = RxHeader.DataLength >> 16; // see FDCAN_data_length_code value
410410

411411
return 1;

0 commit comments

Comments
 (0)