This repository has been archived on 2026-02-22. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
can/Src/mmr_can_message_id.c
T
Stefano Calabretti 2469d96127 Fix bugs
2022-02-12 11:44:45 +01:00

25 lines
504 B
C

#include <stdint.h>
#include "mmr_can_message_id.h"
bool MMR_CAN_IsMessageIdSCS(MmrCanMessageId msgId) {
return MMR_CAN_IsMessageIdOfType(msgId, MMR_CAN_MESSAGE_ID_TYPE_SCS);
}
bool MMR_CAN_IsMessageIdOfType(
MmrCanMessageId msgId,
MmrCanMessageIdType type
) {
return MMR_CAN_GetMessageIdType(msgId) == type;
}
uint8_t MMR_CAN_GetMessageIdType(MmrCanMessageId msgId) {
return msgId >> 7;
}
uint8_t MMR_CAN_GetMessageIdSubtype(MmrCanMessageId msgId) {
return msgId & B8_(0111, 1111);
}