Lines Matching refs:can_mo

529 void XMC_CAN_MO_SetIdentifier(XMC_CAN_MO_t *const can_mo, const uint32_t can_identifier)  in XMC_CAN_MO_SetIdentifier()  argument
531 if ((can_mo->can_mo_ptr->MOAR & CAN_MO_MOAR_IDE_Msk) != (uint32_t)CAN_MO_MOAR_IDE_Msk) in XMC_CAN_MO_SetIdentifier()
533 can_mo->can_mo_ptr->MOAR = ((can_mo->can_mo_ptr->MOAR) & ~(uint32_t)(CAN_MO_MOAR_ID_Msk)) | in XMC_CAN_MO_SetIdentifier()
538 can_mo->can_mo_ptr->MOAR = ((can_mo->can_mo_ptr->MOAR) & ~(uint32_t)(CAN_MO_MOAR_ID_Msk)) | in XMC_CAN_MO_SetIdentifier()
541 can_mo->can_identifier = can_identifier; in XMC_CAN_MO_SetIdentifier()
546 uint32_t XMC_CAN_MO_GetIdentifier(const XMC_CAN_MO_t *const can_mo) in XMC_CAN_MO_GetIdentifier() argument
549 if ((can_mo->can_mo_ptr->MOAR & CAN_MO_MOAR_IDE_Msk) != (uint32_t)CAN_MO_MOAR_IDE_Msk) in XMC_CAN_MO_GetIdentifier()
551 …identifier = ((can_mo->can_mo_ptr->MOAR) & (uint32_t)(CAN_MO_MOAR_ID_Msk)) >> XMC_CAN_MO_MOAR_STDI… in XMC_CAN_MO_GetIdentifier()
555 identifier = ((can_mo->can_mo_ptr->MOAR) & (uint32_t)(CAN_MO_MOAR_ID_Msk)); in XMC_CAN_MO_GetIdentifier()
561 uint32_t XMC_CAN_MO_GetAcceptanceMask(const XMC_CAN_MO_t *const can_mo) in XMC_CAN_MO_GetAcceptanceMask() argument
564 if (((can_mo->can_mo_ptr->MOAMR & CAN_MO_MOAMR_MIDE_Msk) != (uint32_t)CAN_MO_MOAMR_MIDE_Msk) in XMC_CAN_MO_GetAcceptanceMask()
565 && ((can_mo->can_mo_ptr->MOAR & CAN_MO_MOAR_IDE_Msk) != (uint32_t)CAN_MO_MOAR_IDE_Msk)) in XMC_CAN_MO_GetAcceptanceMask()
567 …identifier_mask = ((can_mo->can_mo_ptr->MOAMR) & (uint32_t)(CAN_MO_MOAMR_AM_Msk)) >> XMC_CAN_MO_MO… in XMC_CAN_MO_GetAcceptanceMask()
571 identifier_mask = ((can_mo->can_mo_ptr->MOAMR) & (uint32_t)(CAN_MO_MOAMR_AM_Msk)); in XMC_CAN_MO_GetAcceptanceMask()
577 void XMC_CAN_MO_SetAcceptanceMask(XMC_CAN_MO_t *const can_mo,const uint32_t can_id_mask) in XMC_CAN_MO_SetAcceptanceMask() argument
579 if (((can_mo->can_mo_ptr->MOAMR & CAN_MO_MOAMR_MIDE_Msk) != (uint32_t)CAN_MO_MOAMR_MIDE_Msk) in XMC_CAN_MO_SetAcceptanceMask()
580 && ((can_mo->can_mo_ptr->MOAR & CAN_MO_MOAR_IDE_Msk) != (uint32_t)CAN_MO_MOAR_IDE_Msk)) in XMC_CAN_MO_SetAcceptanceMask()
582 can_mo->can_mo_ptr->MOAMR = ((can_mo->can_mo_ptr->MOAMR) & ~(uint32_t)(CAN_MO_MOAMR_AM_Msk)) | in XMC_CAN_MO_SetAcceptanceMask()
587 can_mo->can_mo_ptr->MOAMR = ((can_mo->can_mo_ptr->MOAMR) & ~(uint32_t)(CAN_MO_MOAMR_AM_Msk)) | in XMC_CAN_MO_SetAcceptanceMask()
590 can_mo->can_id_mask = can_id_mask; in XMC_CAN_MO_SetAcceptanceMask()
594 void XMC_CAN_MO_Config(const XMC_CAN_MO_t *const can_mo) in XMC_CAN_MO_Config() argument
599 uint32_t num = ((uint32_t)(can_mo->can_mo_ptr) - CAN_BASE - 0x1000U)/0x0020U; in XMC_CAN_MO_Config()
601 can_mo->can_mo_ptr->MOIPR &= ~(CAN_MO_MOIPR_MPN_Msk); in XMC_CAN_MO_Config()
602 can_mo->can_mo_ptr->MOIPR |= set; in XMC_CAN_MO_Config()
604 if (((can_mo->can_id_mode != (uint32_t) XMC_CAN_FRAME_TYPE_STANDARD_11BITS) && in XMC_CAN_MO_Config()
605 (can_mo->can_id_mode != (uint32_t) XMC_CAN_FRAME_TYPE_EXTENDED_29BITS)) || in XMC_CAN_MO_Config()
606 ((can_mo->can_mo_type != XMC_CAN_MO_TYPE_RECMSGOBJ) && in XMC_CAN_MO_Config()
607 (can_mo->can_mo_type != XMC_CAN_MO_TYPE_TRANSMSGOBJ))) in XMC_CAN_MO_Config()
615 can_mo->can_mo_ptr->MOCTR = CAN_MO_MOCTR_RESMSGVAL_Msk; in XMC_CAN_MO_Config()
616 if (can_mo->can_id_mode == (uint32_t)XMC_CAN_FRAME_TYPE_STANDARD_11BITS) in XMC_CAN_MO_Config()
618 reg = can_mo->mo_ar; in XMC_CAN_MO_Config()
620 reg |= (can_mo->can_identifier << XMC_CAN_MO_MOAR_STDID_Pos); in XMC_CAN_MO_Config()
621 can_mo->can_mo_ptr->MOAR = reg; in XMC_CAN_MO_Config()
623 reg = can_mo->mo_amr; in XMC_CAN_MO_Config()
625 reg |= (can_mo->can_id_mask << XMC_CAN_MO_MOAR_STDID_Pos); in XMC_CAN_MO_Config()
626 can_mo->can_mo_ptr->MOAMR = reg; in XMC_CAN_MO_Config()
630 can_mo->can_mo_ptr->MOAR = can_mo->mo_ar; in XMC_CAN_MO_Config()
631 can_mo->can_mo_ptr->MOAMR = can_mo->mo_amr; in XMC_CAN_MO_Config()
634 if (can_mo->can_mo_type == XMC_CAN_MO_TYPE_TRANSMSGOBJ) in XMC_CAN_MO_Config()
637 XMC_CAN_MO_UpdateData(can_mo); in XMC_CAN_MO_Config()
638 can_mo->can_mo_ptr->MOCTR = CAN_MO_MOCTR_SETDIR_Msk; in XMC_CAN_MO_Config()
641can_mo->can_mo_ptr->MOCTR = (CAN_MO_MOCTR_SETTXEN0_Msk | CAN_MO_MOCTR_SETTXEN1_Msk | CAN_MO_MOCTR_… in XMC_CAN_MO_Config()
647 can_mo->can_mo_ptr->MOCTR = CAN_MO_MOCTR_RESDIR_Msk; in XMC_CAN_MO_Config()
650can_mo->can_mo_ptr->MOCTR = (CAN_MO_MOCTR_RESTXEN0_Msk | CAN_MO_MOCTR_RESTXEN1_Msk | CAN_MO_MOCTR_… in XMC_CAN_MO_Config()
658 XMC_CAN_STATUS_t XMC_CAN_MO_UpdateData(const XMC_CAN_MO_t *const can_mo) in XMC_CAN_MO_UpdateData() argument
662 if (can_mo->can_mo_type == XMC_CAN_MO_TYPE_TRANSMSGOBJ) in XMC_CAN_MO_UpdateData()
664 can_mo->can_mo_ptr->MOCTR = CAN_MO_MOCTR_RESMSGVAL_Msk; in XMC_CAN_MO_UpdateData()
666 can_mo->can_mo_ptr->MOFCR = ((can_mo->can_mo_ptr->MOFCR) & ~(uint32_t)(CAN_MO_MOFCR_DLC_Msk)) | in XMC_CAN_MO_UpdateData()
667 … (((uint32_t) can_mo->can_data_length << CAN_MO_MOFCR_DLC_Pos) & (uint32_t)CAN_MO_MOFCR_DLC_Msk); in XMC_CAN_MO_UpdateData()
669 can_mo->can_mo_ptr->MODATAL = can_mo->can_data[0]; in XMC_CAN_MO_UpdateData()
670 can_mo->can_mo_ptr->MODATAH = can_mo->can_data[1]; in XMC_CAN_MO_UpdateData()
672can_mo->can_mo_ptr->MOCTR = (CAN_MO_MOCTR_SETNEWDAT_Msk| CAN_MO_MOCTR_SETMSGVAL_Msk |CAN_MO_MOCTR_… in XMC_CAN_MO_UpdateData()
683 XMC_CAN_STATUS_t XMC_CAN_MO_Transmit(const XMC_CAN_MO_t *const can_mo) in XMC_CAN_MO_Transmit() argument
686 …uint32_t mo_type = (uint32_t)(((can_mo->can_mo_ptr->MOSTAT) & CAN_MO_MOSTAT_MSGVAL_Msk) >> CAN_MO_… in XMC_CAN_MO_Transmit()
687 …uint32_t mo_transmission_ongoing = (uint32_t) ((can_mo->can_mo_ptr->MOSTAT) & CAN_MO_MOSTAT_TXRQ_M… in XMC_CAN_MO_Transmit()
701can_mo->can_mo_ptr-> MOCTR = CAN_MO_MOCTR_SETTXRQ_Msk | CAN_MO_MOCTR_SETTXEN0_Msk | CAN_MO_MOCTR_S… in XMC_CAN_MO_Transmit()
708 XMC_CAN_STATUS_t XMC_CAN_MO_ReceiveData (XMC_CAN_MO_t *can_mo) in XMC_CAN_MO_ReceiveData() argument
713 …uint32_t mo_type = (uint32_t)((can_mo->can_mo_ptr->MOSTAT) & CAN_MO_MOSTAT_DIR_Msk) >> CAN_MO_MOST… in XMC_CAN_MO_ReceiveData()
714 …uint32_t mo_recepcion_ongoing = (uint32_t)((can_mo->can_mo_ptr->MOSTAT) & CAN_MO_MOSTAT_RXUPD_Msk)… in XMC_CAN_MO_ReceiveData()
730 can_mo->can_data[0] = can_mo->can_mo_ptr->MODATAL; in XMC_CAN_MO_ReceiveData()
731 can_mo->can_data[1] = can_mo->can_mo_ptr->MODATAH; in XMC_CAN_MO_ReceiveData()
733 …rx_pnd = (uint8_t)((uint32_t)((can_mo->can_mo_ptr->MOSTAT) & CAN_MO_MOSTAT_RXUPD_Msk) >> CAN_MO_MO… in XMC_CAN_MO_ReceiveData()
734 …new_data = (uint8_t)((uint32_t)((can_mo->can_mo_ptr->MOSTAT) & CAN_MO_MOSTAT_NEWDAT_Msk) >> CAN_MO… in XMC_CAN_MO_ReceiveData()
744 XMC_CAN_STATUS_t XMC_CAN_MO_Receive (XMC_CAN_MO_t *can_mo) in XMC_CAN_MO_Receive() argument
749 …uint32_t mo_type = (uint32_t)((can_mo->can_mo_ptr->MOSTAT) & CAN_MO_MOSTAT_DIR_Msk) >> CAN_MO_MOST… in XMC_CAN_MO_Receive()
750 …uint32_t mo_recepcion_ongoing = (uint32_t)((can_mo->can_mo_ptr->MOSTAT) & CAN_MO_MOSTAT_RXUPD_Msk)… in XMC_CAN_MO_Receive()
766 can_mo->can_mo_ptr->MOCTR = CAN_MO_MOCTR_RESNEWDAT_Msk; in XMC_CAN_MO_Receive()
767 if ((((can_mo->can_mo_ptr->MOAR) & CAN_MO_MOAR_IDE_Msk) >> CAN_MO_MOAR_IDE_Pos) == 0U) in XMC_CAN_MO_Receive()
769 can_mo->can_id_mode = (uint32_t)XMC_CAN_FRAME_TYPE_STANDARD_11BITS; in XMC_CAN_MO_Receive()
770can_mo->can_identifier = (can_mo->can_mo_ptr->MOAR & XMC_CAN_MO_MOAR_STDID_Msk) >> XMC_CAN_MO_MOAR… in XMC_CAN_MO_Receive()
771can_mo->can_ide_mask = (uint32_t)(can_mo->can_mo_ptr->MOAMR & CAN_MO_MOAMR_MIDE_Msk) >> CAN_MO_MOA… in XMC_CAN_MO_Receive()
772 if(can_mo->can_ide_mask == 1U) in XMC_CAN_MO_Receive()
774can_mo->can_id_mask = (uint32_t)(can_mo->can_mo_ptr->MOAMR & XMC_CAN_MO_MOAR_STDID_Msk) >> XMC_CAN… in XMC_CAN_MO_Receive()
778 can_mo->can_id_mask = (uint32_t)(can_mo->can_mo_ptr->MOAMR & CAN_MO_MOAMR_AM_Msk); in XMC_CAN_MO_Receive()
783 can_mo->can_id_mode = (uint32_t)XMC_CAN_FRAME_TYPE_EXTENDED_29BITS; in XMC_CAN_MO_Receive()
784 can_mo->can_identifier = (can_mo->can_mo_ptr->MOAR & CAN_MO_MOAR_ID_Msk); in XMC_CAN_MO_Receive()
785 can_mo->can_id_mask = (uint32_t)(can_mo->can_mo_ptr->MOAMR & CAN_MO_MOAMR_AM_Msk); in XMC_CAN_MO_Receive()
786can_mo->can_ide_mask = (uint32_t)(can_mo->can_mo_ptr->MOAMR & CAN_MO_MOAMR_MIDE_Msk) >> CAN_MO_MOA… in XMC_CAN_MO_Receive()
788can_mo->can_data_length = (uint8_t)((uint32_t)((can_mo->can_mo_ptr->MOFCR) & CAN_MO_MOFCR_DLC_Msk)… in XMC_CAN_MO_Receive()
790 can_mo->can_data[0] = can_mo->can_mo_ptr->MODATAL; in XMC_CAN_MO_Receive()
791 can_mo->can_data[1] = can_mo->can_mo_ptr->MODATAH; in XMC_CAN_MO_Receive()
793 …rx_pnd = (uint8_t)((uint32_t)((can_mo->can_mo_ptr->MOSTAT) & CAN_MO_MOSTAT_RXUPD_Msk) >> CAN_MO_MO… in XMC_CAN_MO_Receive()
794 …new_data = (uint8_t)((uint32_t)((can_mo->can_mo_ptr->MOSTAT) & CAN_MO_MOSTAT_NEWDAT_Msk) >> CAN_MO… in XMC_CAN_MO_Receive()
797 can_mo->can_mo_type = XMC_CAN_MO_TYPE_RECMSGOBJ; in XMC_CAN_MO_Receive()
829 XMC_CAN_STATUS_t XMC_CAN_TXFIFO_Transmit(const XMC_CAN_MO_t *const can_mo) in XMC_CAN_TXFIFO_Transmit() argument
832 …uint32_t mo_type = ((uint32_t)((can_mo->can_mo_ptr->MOSTAT) & CAN_MO_MOSTAT_MSGVAL_Msk) >> CAN_MO_… in XMC_CAN_TXFIFO_Transmit()
833 …uint32_t mo_transmission_ongoing = (uint32_t)((can_mo->can_mo_ptr->MOSTAT) & CAN_MO_MOSTAT_TXRQ_Ms… in XMC_CAN_TXFIFO_Transmit()
834 …uint32_t mo_cur = (uint32_t)(can_mo->can_mo_ptr-> MOFGPR & CAN_MO_MOFGPR_CUR_Msk) >> CAN_MO_MOFGP… in XMC_CAN_TXFIFO_Transmit()
855 void XMC_CAN_TXFIFO_ConfigMOBaseObject(const XMC_CAN_MO_t *const can_mo,const XMC_CAN_FIFO_CONFIG_t… in XMC_CAN_TXFIFO_ConfigMOBaseObject() argument
857 can_mo->can_mo_ptr->MOFCR = ((can_mo->can_mo_ptr->MOFCR ) & ~(uint32_t)(CAN_MO_MOFCR_MMC_Msk)) | in XMC_CAN_TXFIFO_ConfigMOBaseObject()
859 can_mo->can_mo_ptr->MOFGPR = ((can_mo->can_mo_ptr->MOFGPR ) & ~(uint32_t)(CAN_MO_MOFGPR_BOT_Msk | in XMC_CAN_TXFIFO_ConfigMOBaseObject()
867 void XMC_CAN_RXFIFO_ConfigMOBaseObject(const XMC_CAN_MO_t *const can_mo,const XMC_CAN_FIFO_CONFIG_t… in XMC_CAN_RXFIFO_ConfigMOBaseObject() argument
869 can_mo->can_mo_ptr->MOFCR = ((can_mo->can_mo_ptr->MOFCR ) & ~(uint32_t)(CAN_MO_MOFCR_MMC_Msk)) | in XMC_CAN_RXFIFO_ConfigMOBaseObject()
871 can_mo->can_mo_ptr->MOFGPR = ((can_mo->can_mo_ptr->MOFGPR ) & ~( uint32_t)(CAN_MO_MOFGPR_BOT_Msk | in XMC_CAN_RXFIFO_ConfigMOBaseObject()
880 void XMC_CAN_TXFIFO_ConfigMOSlaveObject(const XMC_CAN_MO_t *const can_mo,const XMC_CAN_FIFO_CONFIG_… in XMC_CAN_TXFIFO_ConfigMOSlaveObject() argument
882 can_mo->can_mo_ptr->MOFCR = ((can_mo->can_mo_ptr->MOFCR ) & ~(uint32_t)(CAN_MO_MOFCR_MMC_Msk)) | in XMC_CAN_TXFIFO_ConfigMOSlaveObject()
884can_mo->can_mo_ptr->MOFGPR = ((can_mo->can_mo_ptr->MOFGPR ) & ~(uint32_t)(CAN_MO_MOFGPR_CUR_Msk)) | in XMC_CAN_TXFIFO_ConfigMOSlaveObject()
887 can_mo->can_mo_ptr->MOCTR = CAN_MO_MOCTR_SETTXEN0_Msk| in XMC_CAN_TXFIFO_ConfigMOSlaveObject()
892 void XMC_CAN_GATEWAY_InitSourceObject(const XMC_CAN_MO_t *const can_mo,const XMC_CAN_GATEWAY_CONFIG… in XMC_CAN_GATEWAY_InitSourceObject() argument
894can_mo->can_mo_ptr->MOFCR = (((uint32_t)0x4U << CAN_MO_MOFCR_MMC_Pos) & (uint32_t)CAN_MO_MOFCR_MMC… in XMC_CAN_GATEWAY_InitSourceObject()
899can_mo->can_mo_ptr->MOFGPR = (uint32_t)((((uint32_t)can_gateway.gateway_bottom << CAN_MO_MOFGPR_BO… in XMC_CAN_GATEWAY_InitSourceObject()