Fix wrong memcpy parameter

This commit is contained in:
Valeriy Van 2018-03-02 11:46:40 +01:00
parent b9c2acba87
commit a3bac3cb61
1 changed files with 2 additions and 2 deletions

View File

@ -415,7 +415,7 @@ void MCAN_SetSTDFilterElement(CAN_Type *base,
{
uint8_t *elementAddress = 0;
elementAddress = (uint8_t *)(MCAN_GetMsgRAMBase(base) + config->address + idx * 4U);
memcpy(elementAddress, filter, sizeof(filter));
memcpy(elementAddress, filter, sizeof(*filter));
}
void MCAN_SetEXTFilterElement(CAN_Type *base,
@ -425,7 +425,7 @@ void MCAN_SetEXTFilterElement(CAN_Type *base,
{
uint8_t *elementAddress = 0;
elementAddress = (uint8_t *)(MCAN_GetMsgRAMBase(base) + config->address + idx * 8U);
memcpy(elementAddress, filter, sizeof(filter));
memcpy(elementAddress, filter, sizeof(*filter));
}
static uint32_t MCAN_GetRxFifo0ElementAddress(CAN_Type *base)