cancel
Showing results for 
Search instead for 
Did you mean: 

Bug in stm32f10x_can.c

daviddavid91
Associate II
Posted on January 26, 2009 at 05:05

Bug in stm32f10x_can.c

1 REPLY 1
daviddavid91
Associate II
Posted on May 17, 2011 at 13:00

The following function seems to have a wrong argument for the parameter check:

u8 CAN_Transmit(CanTxMsg* TxMessage)

{

u8 TransmitMailbox = 0;

/* Check the parameters */

assert_param(IS_CAN_STDID(TxMessage->StdId));

assert_param(IS_CAN_EXTID(TxMessage->StdId));

assert_param(IS_CAN_IDTYPE(TxMessage->IDE));

assert_param(IS_CAN_RTR(TxMessage->RTR));

assert_param(IS_CAN_DLC(TxMessage->DLC));

...

}

The second time it must be TxMessage->ExdId, since the macro's name is also IS_CAN_EXTID.

Btw: Is this the right place to post such things?!

Michael