3 Replies Latest reply on Mar 14, 2017 4:33 AM by user_78878863

    4200L Best way to extract uint16 from CAN Message?

    info_1957421

      Hi,

         

      I'm searching for an easy way to extract/put uint16 form/in CAN Messages/Mailboxes

         

      Before (with other Platform) I do this:

         

                      UB12=(*(short *) &CAN_Receive_Data[1]);
                      UB24=(*(short *) &CAN_Receive_Data[3]);

         

              (*(short *) &CAN_Send_Data[1])=UB12;
              (*(short *) &CAN_Send_Data[3])=UB24;

         

      Regards,

         

      Michael