Lines Matching refs:message
406 const CAN_MessageObject_TypeDef *message, in CAN_SetIdAndFilter() argument
410 EFM_ASSERT((message->msgNum > 0) && (message->msgNum <= 32)); in CAN_SetIdAndFilter()
421 CAN_SendRequest(can, interface, message->msgNum, true); in CAN_SetIdAndFilter()
426 CAN_SendRequest(can, interface, message->msgNum, true); in CAN_SetIdAndFilter()
435 if (message->extended) { in CAN_SetIdAndFilter()
436 EFM_ASSERT(message->id <= _CAN_MIR_ARB_ID_MASK); in CAN_SetIdAndFilter()
438 | (message->id << _CAN_MIR_ARB_ID_SHIFT) in CAN_SetIdAndFilter()
442 EFM_ASSERT(message->id <= _CAN_MIR_ARB_STD_ID_MAX); in CAN_SetIdAndFilter()
444 | (message->id << _CAN_MIR_ARB_STD_ID_SHIFT) in CAN_SetIdAndFilter()
448 if (message->extendedMask) { in CAN_SetIdAndFilter()
449 mir->MASK = (message->mask << _CAN_MIR_MASK_MASK_SHIFT) in CAN_SetIdAndFilter()
452 mir->MASK = (message->mask << _CAN_MIR_MASK_STD_SHIFT) in CAN_SetIdAndFilter()
457 mir->MASK |= (message->extendedMask << _CAN_MIR_MASK_MXTD_SHIFT) in CAN_SetIdAndFilter()
458 | (message->directionMask << _CAN_MIR_MASK_MDIR_SHIFT); in CAN_SetIdAndFilter()
461 CAN_SendRequest(can, interface, message->msgNum, wait); in CAN_SetIdAndFilter()
574 const CAN_MessageObject_TypeDef *message, in CAN_SendMessage() argument
580 EFM_ASSERT((message->msgNum > 0) && (message->msgNum <= 32)); in CAN_SendMessage()
582 EFM_ASSERT(message->dlc <= _CAN_MIR_CTRL_DLC_MASK); in CAN_SendMessage()
595 CAN_SendRequest(can, interface, message->msgNum, true); in CAN_SendMessage()
600 CAN_SendRequest(can, interface, message->msgNum, true); in CAN_SendMessage()
610 CAN_WriteData(can, interface, message); in CAN_SendMessage()
625 | message->dlc; in CAN_SendMessage()
628 if (message->extended) { in CAN_SendMessage()
629 EFM_ASSERT(message->id <= _CAN_MIR_ARB_ID_MASK); in CAN_SendMessage()
631 | (message->id << _CAN_MIR_ARB_ID_SHIFT) in CAN_SendMessage()
635 EFM_ASSERT(message->id <= _CAN_MIR_ARB_STD_ID_MAX); in CAN_SendMessage()
638 | (message->id << _CAN_MIR_ARB_STD_ID_SHIFT) in CAN_SendMessage()
643 CAN_SendRequest(can, interface, message->msgNum, wait); in CAN_SendMessage()
670 CAN_MessageObject_TypeDef *message) in CAN_ReadMessage() argument
677 EFM_ASSERT((message->msgNum > 0) && (message->msgNum <= 32)); in CAN_ReadMessage()
692 CAN_SendRequest(can, interface, message->msgNum, true); in CAN_ReadMessage()
699 message->dlc = ((mir->CTRL & _CAN_MIR_CTRL_DLC_MASK) >> _CAN_MIR_CTRL_DLC_SHIFT); in CAN_ReadMessage()
702 EFM_ASSERT(message->dlc <= 8); in CAN_ReadMessage()
705 if (message->extended) { in CAN_ReadMessage()
706 message->id = (mir->ARB & _CAN_MIR_ARB_ID_MASK); in CAN_ReadMessage()
708 message->id = ((mir->ARB & _CAN_MIR_ARB_STD_ID_MASK) >> _CAN_MIR_ARB_STD_ID_SHIFT); in CAN_ReadMessage()
713 for (i = 0; i < SL_MIN(message->dlc, 4U); ++i) { in CAN_ReadMessage()
714 message->data[i] = buffer & 0xFF; in CAN_ReadMessage()
717 if (message->dlc > 3) { in CAN_ReadMessage()
719 for (i = 0; i < message->dlc - 4U; ++i) { in CAN_ReadMessage()
720 message->data[i + 4] = buffer & 0xFF; in CAN_ReadMessage()
874 const CAN_MessageObject_TypeDef *message) in CAN_WriteData() argument
878 size_t length = SL_MIN(8, message->dlc); in CAN_WriteData()
882 data[i] = message->data[i]; in CAN_WriteData()