本帖最后由 dxfshsh 于 2020-1-21 20:43 编辑
/* set the data */ if(transmit_message->tx_dlen>0)
{
i = transmit_message->tx_dlen-1 / 4U;
for( j=0; j<i+1; j++)
{
CAN_TMDATA0(can_periph, mailbox_number) = *(uint32_t *)p_temp;
p_temp = ((uint32_t)((uint32_t)p_temp + 4U));
}
}
是不是更简洁,如有错误请及时指正!万分感谢!!!!
不好意思发错地方了,不会删帖哈!!!
|