Lines Matching refs:IF
87 if((tCAN->IF[0ul].CREQ & CAN_IF_CREQ_BUSY_Msk) == 0ul) in LockIF()
105 if((tCAN->IF[1ul].CREQ & CAN_IF_CREQ_BUSY_Msk) == 0ul) in LockIF()
283 if(tCAN->IF[1].MCON & CAN_IF_MCON_NEWDAT_Msk) /* check new data */ in CAN_WaitMsg()
390 while(tCAN->IF[0].CREQ & CAN_IF_CREQ_BUSY_Msk) in CAN_BasicSendMsg()
399 tCAN->IF[0].ARB1 = 0ul; in CAN_BasicSendMsg()
400 tCAN->IF[0].ARB2 = (((pCanMsg->Id) & 0x7FFul) << 2ul) ; in CAN_BasicSendMsg()
405 tCAN->IF[0].ARB1 = (pCanMsg->Id) & 0xFFFFul; in CAN_BasicSendMsg()
406 tCAN->IF[0].ARB2 = ((pCanMsg->Id) & 0x1FFF0000ul) >> 16ul | CAN_IF_ARB2_XTD_Msk; in CAN_BasicSendMsg()
412 tCAN->IF[0].ARB2 |= CAN_IF_ARB2_DIR_Msk; in CAN_BasicSendMsg()
416 tCAN->IF[0].ARB2 &= (~CAN_IF_ARB2_DIR_Msk); in CAN_BasicSendMsg()
419 tCAN->IF[0].MCON = (tCAN->IF[0].MCON & (~CAN_IF_MCON_DLC_Msk)) | pCanMsg->DLC; in CAN_BasicSendMsg()
420 tCAN->IF[0].DAT_A1 = (uint16_t)((uint16_t)((uint16_t)pCanMsg->Data[1] << 8) | pCanMsg->Data[0]); in CAN_BasicSendMsg()
421 tCAN->IF[0].DAT_A2 = (uint16_t)((uint16_t)((uint16_t)pCanMsg->Data[3] << 8) | pCanMsg->Data[2]); in CAN_BasicSendMsg()
422 tCAN->IF[0].DAT_B1 = (uint16_t)((uint16_t)((uint16_t)pCanMsg->Data[5] << 8) | pCanMsg->Data[4]); in CAN_BasicSendMsg()
423 tCAN->IF[0].DAT_B2 = (uint16_t)((uint16_t)((uint16_t)pCanMsg->Data[7] << 8) | pCanMsg->Data[6]); in CAN_BasicSendMsg()
426 tCAN->IF[0].CREQ &= (~CAN_IF_CREQ_BUSY_Msk); in CAN_BasicSendMsg()
427 if(tCAN->IF[0].CREQ & CAN_IF_CREQ_BUSY_Msk) in CAN_BasicSendMsg()
434 tCAN->IF[0].CREQ |= CAN_IF_CREQ_BUSY_Msk; /* sending */ in CAN_BasicSendMsg()
438 if((tCAN->IF[0].CREQ & CAN_IF_CREQ_BUSY_Msk) == 0ul) in CAN_BasicSendMsg()
474 if((tCAN->IF[1].MCON & CAN_IF_MCON_NEWDAT_Msk) == 0ul) in CAN_BasicReceiveMsg()
484 tCAN->IF[1].CMASK = CAN_IF_CMASK_ARB_Msk in CAN_BasicReceiveMsg()
489 if((tCAN->IF[1].ARB2 & CAN_IF_ARB2_XTD_Msk) == 0ul) in CAN_BasicReceiveMsg()
493 pCanMsg->Id = (tCAN->IF[1].ARB2 >> 2) & 0x07FFul; in CAN_BasicReceiveMsg()
500 pCanMsg->Id = (tCAN->IF[1].ARB2 & 0x1FFFul) << 16; in CAN_BasicReceiveMsg()
501 pCanMsg->Id |= (uint32_t)tCAN->IF[1].ARB1; in CAN_BasicReceiveMsg()
504 …pCanMsg->FrameType = (((tCAN->IF[1].ARB2 & CAN_IF_ARB2_DIR_Msk) >> CAN_IF_ARB2_DIR_Pos)) ? 0ul : 1… in CAN_BasicReceiveMsg()
506 pCanMsg->DLC = (uint8_t)(tCAN->IF[1].MCON & CAN_IF_MCON_DLC_Msk); in CAN_BasicReceiveMsg()
507 pCanMsg->Data[0] = (uint8_t)(tCAN->IF[1].DAT_A1 & CAN_IF_DAT_A1_DATA0_Msk); in CAN_BasicReceiveMsg()
508 …pCanMsg->Data[1] = (uint8_t)((tCAN->IF[1].DAT_A1 & CAN_IF_DAT_A1_DATA1_Msk) >> CAN_IF_DAT_A1_DATA1… in CAN_BasicReceiveMsg()
509 pCanMsg->Data[2] = (uint8_t)(tCAN->IF[1].DAT_A2 & CAN_IF_DAT_A2_DATA2_Msk); in CAN_BasicReceiveMsg()
510 …pCanMsg->Data[3] = (uint8_t)((tCAN->IF[1].DAT_A2 & CAN_IF_DAT_A2_DATA3_Msk) >> CAN_IF_DAT_A2_DATA3… in CAN_BasicReceiveMsg()
511 pCanMsg->Data[4] = (uint8_t)(tCAN->IF[1].DAT_B1 & CAN_IF_DAT_B1_DATA4_Msk); in CAN_BasicReceiveMsg()
512 …pCanMsg->Data[5] = (uint8_t)((tCAN->IF[1].DAT_B1 & CAN_IF_DAT_B1_DATA5_Msk) >> CAN_IF_DAT_B1_DATA5… in CAN_BasicReceiveMsg()
513 pCanMsg->Data[6] = (uint8_t)(tCAN->IF[1].DAT_B2 & CAN_IF_DAT_B2_DATA6_Msk); in CAN_BasicReceiveMsg()
514 …pCanMsg->Data[7] = (uint8_t)((tCAN->IF[1].DAT_B2 & CAN_IF_DAT_B2_DATA7_Msk) >> CAN_IF_DAT_B2_DATA7… in CAN_BasicReceiveMsg()
551 …tCAN->IF[u32MsgIfNum].CMASK = CAN_IF_CMASK_WRRD_Msk | CAN_IF_CMASK_MASK_Msk | CAN_IF_CMASK_ARB_Msk… in CAN_SetRxMsgObjAndMsk()
556 tCAN->IF[u32MsgIfNum].ARB1 = 0ul; in CAN_SetRxMsgObjAndMsk()
557 tCAN->IF[u32MsgIfNum].ARB2 = CAN_IF_ARB2_MSGVAL_Msk | (u32id & 0x7FFul) << 2; in CAN_SetRxMsgObjAndMsk()
561 tCAN->IF[u32MsgIfNum].ARB1 = u32id & 0xFFFFul; in CAN_SetRxMsgObjAndMsk()
562 …tCAN->IF[u32MsgIfNum].ARB2 = CAN_IF_ARB2_MSGVAL_Msk | CAN_IF_ARB2_XTD_Msk | (u32id & 0x1FFF0000ul)… in CAN_SetRxMsgObjAndMsk()
565 tCAN->IF[u32MsgIfNum].MASK1 = (u32idmask & 0xFFFFul); in CAN_SetRxMsgObjAndMsk()
566 tCAN->IF[u32MsgIfNum].MASK2 = (u32idmask >> 16) & 0xFFFFul; in CAN_SetRxMsgObjAndMsk()
569 tCAN->IF[u32MsgIfNum].MCON = CAN_IF_MCON_UMASK_Msk | CAN_IF_MCON_RXIE_Msk; in CAN_SetRxMsgObjAndMsk()
572 tCAN->IF[u32MsgIfNum].MCON |= CAN_IF_MCON_EOB_Msk; in CAN_SetRxMsgObjAndMsk()
576 tCAN->IF[u32MsgIfNum].MCON &= (~CAN_IF_MCON_EOB_Msk); in CAN_SetRxMsgObjAndMsk()
579 tCAN->IF[u32MsgIfNum].DAT_A1 = 0ul; in CAN_SetRxMsgObjAndMsk()
580 tCAN->IF[u32MsgIfNum].DAT_A2 = 0ul; in CAN_SetRxMsgObjAndMsk()
581 tCAN->IF[u32MsgIfNum].DAT_B1 = 0ul; in CAN_SetRxMsgObjAndMsk()
582 tCAN->IF[u32MsgIfNum].DAT_B2 = 0ul; in CAN_SetRxMsgObjAndMsk()
584 tCAN->IF[u32MsgIfNum].CREQ = 1ul + u8MsgObj; in CAN_SetRxMsgObjAndMsk()
621 …tCAN->IF[u32MsgIfNum].CMASK = CAN_IF_CMASK_WRRD_Msk | CAN_IF_CMASK_MASK_Msk | CAN_IF_CMASK_ARB_Msk… in CAN_SetRxMsgObj()
626 tCAN->IF[u32MsgIfNum].ARB1 = 0ul; in CAN_SetRxMsgObj()
627 tCAN->IF[u32MsgIfNum].ARB2 = CAN_IF_ARB2_MSGVAL_Msk | (u32id & 0x7FFul) << 2; in CAN_SetRxMsgObj()
631 tCAN->IF[u32MsgIfNum].ARB1 = u32id & 0xFFFFul; in CAN_SetRxMsgObj()
632 …tCAN->IF[u32MsgIfNum].ARB2 = CAN_IF_ARB2_MSGVAL_Msk | CAN_IF_ARB2_XTD_Msk | (u32id & 0x1FFF0000ul)… in CAN_SetRxMsgObj()
636 tCAN->IF[u32MsgIfNum].MCON = CAN_IF_MCON_UMASK_Msk | CAN_IF_MCON_RXIE_Msk; in CAN_SetRxMsgObj()
639 tCAN->IF[u32MsgIfNum].MCON |= CAN_IF_MCON_EOB_Msk; in CAN_SetRxMsgObj()
643 tCAN->IF[u32MsgIfNum].MCON &= (~CAN_IF_MCON_EOB_Msk); in CAN_SetRxMsgObj()
646 tCAN->IF[u32MsgIfNum].DAT_A1 = 0ul; in CAN_SetRxMsgObj()
647 tCAN->IF[u32MsgIfNum].DAT_A2 = 0ul; in CAN_SetRxMsgObj()
648 tCAN->IF[u32MsgIfNum].DAT_B1 = 0ul; in CAN_SetRxMsgObj()
649 tCAN->IF[u32MsgIfNum].DAT_B2 = 0ul; in CAN_SetRxMsgObj()
651 tCAN->IF[u32MsgIfNum].CREQ = 1ul + u8MsgObj; in CAN_SetRxMsgObj()
692 tCAN->IF[u32MsgIfNum].CMASK = CAN_IF_CMASK_MASK_Msk in CAN_ReadMsgObj()
700 tCAN->IF[u32MsgIfNum].CREQ = 1ul + u8MsgObj; in CAN_ReadMsgObj()
702 while(tCAN->IF[u32MsgIfNum].CREQ & CAN_IF_CREQ_BUSY_Msk) in CAN_ReadMsgObj()
707 if((tCAN->IF[u32MsgIfNum].ARB2 & CAN_IF_ARB2_XTD_Msk) == 0ul) in CAN_ReadMsgObj()
711 pCanMsg->Id = (tCAN->IF[u32MsgIfNum].ARB2 & CAN_IF_ARB2_ID_Msk) >> 2ul; in CAN_ReadMsgObj()
717 … pCanMsg->Id = (((tCAN->IF[u32MsgIfNum].ARB2) & 0x1FFFul) << 16) | tCAN->IF[u32MsgIfNum].ARB1; in CAN_ReadMsgObj()
720 pCanMsg->DLC = (uint8_t)(tCAN->IF[u32MsgIfNum].MCON & CAN_IF_MCON_DLC_Msk); in CAN_ReadMsgObj()
721 pCanMsg->Data[0] = (uint8_t)(tCAN->IF[u32MsgIfNum].DAT_A1 & CAN_IF_DAT_A1_DATA0_Msk); in CAN_ReadMsgObj()
722 …pCanMsg->Data[1] = (uint8_t)((tCAN->IF[u32MsgIfNum].DAT_A1 & CAN_IF_DAT_A1_DATA1_Msk) >> CAN_IF_DA… in CAN_ReadMsgObj()
723 pCanMsg->Data[2] = (uint8_t)(tCAN->IF[u32MsgIfNum].DAT_A2 & CAN_IF_DAT_A2_DATA2_Msk); in CAN_ReadMsgObj()
724 …pCanMsg->Data[3] = (uint8_t)((tCAN->IF[u32MsgIfNum].DAT_A2 & CAN_IF_DAT_A2_DATA3_Msk) >> CAN_IF_DA… in CAN_ReadMsgObj()
725 pCanMsg->Data[4] = (uint8_t)(tCAN->IF[u32MsgIfNum].DAT_B1 & CAN_IF_DAT_B1_DATA4_Msk); in CAN_ReadMsgObj()
726 …pCanMsg->Data[5] = (uint8_t)((tCAN->IF[u32MsgIfNum].DAT_B1 & CAN_IF_DAT_B1_DATA5_Msk) >> CAN_IF_DA… in CAN_ReadMsgObj()
727 pCanMsg->Data[6] = (uint8_t)(tCAN->IF[u32MsgIfNum].DAT_B2 & CAN_IF_DAT_B2_DATA6_Msk); in CAN_ReadMsgObj()
728 …pCanMsg->Data[7] = (uint8_t)((tCAN->IF[u32MsgIfNum].DAT_B2 & CAN_IF_DAT_B2_DATA7_Msk) >> CAN_IF_DA… in CAN_ReadMsgObj()
940 …tCAN->IF[u32MsgIfNum].CMASK = CAN_IF_CMASK_WRRD_Msk | CAN_IF_CMASK_MASK_Msk | CAN_IF_CMASK_ARB_Msk… in CAN_SetTxMsg()
946 tCAN->IF[u32MsgIfNum].ARB1 = 0ul; in CAN_SetTxMsg()
947 …tCAN->IF[u32MsgIfNum].ARB2 = (((pCanMsg->Id) & 0x7FFul) << 2) | CAN_IF_ARB2_DIR_Msk | CAN_IF_ARB2_… in CAN_SetTxMsg()
952 tCAN->IF[u32MsgIfNum].ARB1 = (pCanMsg->Id) & 0xFFFFul; in CAN_SetTxMsg()
953 tCAN->IF[u32MsgIfNum].ARB2 = ((pCanMsg->Id) & 0x1FFF0000ul) >> 16 | in CAN_SetTxMsg()
959 tCAN->IF[u32MsgIfNum].ARB2 |= CAN_IF_ARB2_DIR_Msk; in CAN_SetTxMsg()
963 tCAN->IF[u32MsgIfNum].ARB2 &= (~CAN_IF_ARB2_DIR_Msk); in CAN_SetTxMsg()
966 …tCAN->IF[u32MsgIfNum].DAT_A1 = (uint16_t)((uint16_t)(((uint16_t)pCanMsg->Data[1] << 8)) | pCanMsg-… in CAN_SetTxMsg()
967 …tCAN->IF[u32MsgIfNum].DAT_A2 = (uint16_t)((uint16_t)(((uint16_t)pCanMsg->Data[3] << 8)) | pCanMsg-… in CAN_SetTxMsg()
968 …tCAN->IF[u32MsgIfNum].DAT_B1 = (uint16_t)((uint16_t)(((uint16_t)pCanMsg->Data[5] << 8)) | pCanMsg-… in CAN_SetTxMsg()
969 …tCAN->IF[u32MsgIfNum].DAT_B2 = (uint16_t)((uint16_t)(((uint16_t)pCanMsg->Data[7] << 8)) | pCanMsg-… in CAN_SetTxMsg()
971 …tCAN->IF[u32MsgIfNum].MCON = CAN_IF_MCON_NEWDAT_Msk | pCanMsg->DLC | CAN_IF_MCON_TXIE_Msk | CAN… in CAN_SetTxMsg()
972 tCAN->IF[u32MsgIfNum].CREQ = 1ul + u32MsgNum; in CAN_SetTxMsg()
1004 tCAN->IF[u32MsgIfNum].CMASK = CAN_IF_CMASK_CLRINTPND_Msk in CAN_TriggerTxMsg()
1007 tCAN->IF[u32MsgIfNum].CREQ = 1ul + u32MsgNum; in CAN_TriggerTxMsg()
1009 while(tCAN->IF[u32MsgIfNum].CREQ & CAN_IF_CREQ_BUSY_Msk) in CAN_TriggerTxMsg()
1013 tCAN->IF[u32MsgIfNum].CMASK = CAN_IF_CMASK_WRRD_Msk | CAN_IF_CMASK_TXRQSTNEWDAT_Msk; in CAN_TriggerTxMsg()
1014 tCAN->IF[u32MsgIfNum].CREQ = 1ul + u32MsgNum; in CAN_TriggerTxMsg()
1278 tCAN->IF[u32MsgIfNum].CMASK = CAN_IF_CMASK_CLRINTPND_Msk | CAN_IF_CMASK_TXRQSTNEWDAT_Msk; in CAN_CLR_INT_PENDING_BIT()
1279 tCAN->IF[u32MsgIfNum].CREQ = 1ul + u32MsgNum; in CAN_CLR_INT_PENDING_BIT()