From d0c8ad75e1956c20b359f1a2884e0819cd809f26 Mon Sep 17 00:00:00 2001 From: m-ecry Date: Mon, 14 Sep 2020 18:10:48 +0200 Subject: [PATCH] STM-can-api: Support reading of remote_msg - Previously a received msg was fixed of data_type --- targets/TARGET_STM/can_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targets/TARGET_STM/can_api.c b/targets/TARGET_STM/can_api.c index 61903b27dd..29a7c96da5 100644 --- a/targets/TARGET_STM/can_api.c +++ b/targets/TARGET_STM/can_api.c @@ -405,7 +405,7 @@ int can_read(can_t *obj, CAN_Message *msg, int handle) msg->format = CANExtended; } msg->id = RxHeader.Identifier; - msg->type = CANData; + msg->type = (RxHeader.RxFrameType == FDCAN_DATA_FRAME) ? CANData : CANRemote; msg->len = RxHeader.DataLength >> 16; // see FDCAN_data_length_code value return 1;