Skip to content

Commit

Permalink
Merge pull request #14597 from CalSol/lpc15xx_extended_can_5_15
Browse files Browse the repository at this point in the history
LPC15xx extended CAN fix (5.15)
  • Loading branch information
0xc0170 authored Jun 15, 2021
2 parents 972c8fd + 5a1068f commit bfe3d50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions targets/TARGET_NXP/TARGET_LPC15XX/can_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -649,8 +649,8 @@ int can_read(can_t *obj, CAN_Message *msg, int handle) {

if (LPC_C_CAN0->CANIF2_ARB2 & CANIFn_ARB2_XTD) {
msg->format = CANExtended;
msg->id = (LPC_C_CAN0->CANIF2_ARB1 & 0x1FFF) << 16;
msg->id |= (LPC_C_CAN0->CANIF2_ARB2 & 0x1FFF);
msg->id = (LPC_C_CAN0->CANIF2_ARB2 & 0x1FFF) << 16;
msg->id |= (LPC_C_CAN0->CANIF2_ARB1 & 0xFFFF);
} else {
msg->format = CANStandard;
msg->id = (LPC_C_CAN0->CANIF2_ARB2 & 0x1FFF) >> 2;
Expand Down

0 comments on commit bfe3d50

Please sign in to comment.