drivers: Correct tx and rx error counts in mcan
TX and RX error counts are swapped in the mcan driver. Signed-off-by: Thad House <thadhouse@fb.com>
This commit is contained in:
parent
7adacb707a
commit
f37db90541
1 changed files with 2 additions and 2 deletions
|
@ -761,10 +761,10 @@ int can_mcan_get_state(const struct device *dev, enum can_state *state,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (err_cnt != NULL) {
|
if (err_cnt != NULL) {
|
||||||
err_cnt->rx_err_cnt = (can->ecr & CAN_MCAN_ECR_TEC_MSK) <<
|
err_cnt->tx_err_cnt = (can->ecr & CAN_MCAN_ECR_TEC_MSK) <<
|
||||||
CAN_MCAN_ECR_TEC_POS;
|
CAN_MCAN_ECR_TEC_POS;
|
||||||
|
|
||||||
err_cnt->tx_err_cnt = (can->ecr & CAN_MCAN_ECR_REC_MSK) <<
|
err_cnt->rx_err_cnt = (can->ecr & CAN_MCAN_ECR_REC_MSK) <<
|
||||||
CAN_MCAN_ECR_REC_POS;
|
CAN_MCAN_ECR_REC_POS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue