Skip to content

Commit 2cc08cf

Browse files
committed
Rebaseing to current master
1 parent 5049b51 commit 2cc08cf

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

targets/TARGET_STM/can_api.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ int can_write(can_t *obj, CAN_Message msg, int cc)
400400

401401
int can_read(can_t *obj, CAN_Message *msg, int handle)
402402
{
403-
UNUSED(handle); // Not supported
403+
UNUSED(handle); // Not supported, RXFIFO0 is set default by can_filter and cannot be changed.
404404

405405
if (HAL_FDCAN_GetRxFifoFillLevel(&obj->CanHandle, FDCAN_RX_FIFO0) == 0) {
406406
return 0; // No message arrived
@@ -1109,10 +1109,6 @@ int can_mode(can_t *obj, CanMode mode)
11091109
int can_filter(can_t *obj, uint32_t id, uint32_t mask, CANFormat format, int32_t handle)
11101110
{
11111111
int success = 0;
1112-
1113-
if(handle != 0) { // message filter handle not supported yet for STM controllers
1114-
return 0;
1115-
}
11161112

11171113
// filter for CANAny format cannot be configured for STM32
11181114
if ((format == CANStandard) || (format == CANExtended)) {

0 commit comments

Comments
 (0)