STM32/mavlink/Lattepanda_shiled/mavlink_msg_transmit_can_data.h
/*
  This varient of _send() can be used to save stack space by re-using
  memory from the receive buffer.  The caller provides a
  mavlink_message_t which is the size of a full mavlink message. This
  is usually the receive buffer for the channel, and allows a reply to an
  incoming message with minimum stack space usage.
 */
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer.  The caller provides a
mavlink_message_t which is the size of a full mavlink message. This
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
This varient of _send () can be used to save stack space by re - using memory from the receive buffer . The caller provides a mavlink_message_t which is the size of a full mavlink message . This is usually the receive buffer for the channel and allows a reply to an incoming message with minimum stack space usage .
static inline void mavlink_msg_transmit_can_data_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan,  uint32_t CAN_ID, const uint8_t *CAN_Data, uint8_t CAN_RTR)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
	char *buf = (char *)msgbuf;
	_mav_put_uint32_t(buf, 0, CAN_ID);
	_mav_put_uint8_t(buf, 12, CAN_RTR);
	_mav_put_uint8_t_array(buf, 4, CAN_Data, 8);
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TRANSMIT_CAN_DATA, buf, MAVLINK_MSG_ID_TRANSMIT_CAN_DATA_MIN_LEN, MAVLINK_MSG_ID_TRANSMIT_CAN_DATA_LEN, MAVLINK_MSG_ID_TRANSMIT_CAN_DATA_CRC);
#else
	mavlink_transmit_can_data_t *packet = (mavlink_transmit_can_data_t *)msgbuf;
	packet->CAN_ID = CAN_ID;
	packet->CAN_RTR = CAN_RTR;
	mav_array_memcpy(packet->CAN_Data, CAN_Data, sizeof(uint8_t)*8);
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TRANSMIT_CAN_DATA, (const char *)packet, MAVLINK_MSG_ID_TRANSMIT_CAN_DATA_MIN_LEN, MAVLINK_MSG_ID_TRANSMIT_CAN_DATA_LEN, MAVLINK_MSG_ID_TRANSMIT_CAN_DATA_CRC);
#endif
}
static inline void mavlink_msg_transmit_can_data_send_buf ( mavlink_message_t * msgbuf , mavlink_channel_t chan , uint32_t CAN_ID , const uint8_t * CAN_Data , uint8_t CAN_RTR ) { #if MAVLINK_NEED_BYTE_SWAP || ! MAVLINK_ALIGNED_FIELDS char * buf = ( char * ) msgbuf ; _mav_put_uint32_t ( buf , 0 , CAN_ID ) ; _mav_put_uint8_t ( buf , 12 , CAN_RTR ) ; _mav_put_uint8_t_array ( buf , 4 , CAN_Data , 8 ) ; _mav_finalize_message_chan_send ( chan , MAVLINK_MSG_ID_TRANSMIT_CAN_DATA , buf , MAVLINK_MSG_ID_TRANSMIT_CAN_DATA_MIN_LEN , MAVLINK_MSG_ID_TRANSMIT_CAN_DATA_LEN , MAVLINK_MSG_ID_TRANSMIT_CAN_DATA_CRC ) ; #else mavlink_transmit_can_data_t * packet = ( mavlink_transmit_can_data_t * ) msgbuf ; packet -> CAN_ID = CAN_ID ; packet -> CAN_RTR = CAN_RTR ; mav_array_memcpy ( packet -> CAN_Data , CAN_Data , sizeof ( uint8_t ) * 8 ) ; _mav_finalize_message_chan_send ( chan , MAVLINK_MSG_ID_TRANSMIT_CAN_DATA , ( const char * ) packet , MAVLINK_MSG_ID_TRANSMIT_CAN_DATA_MIN_LEN , MAVLINK_MSG_ID_TRANSMIT_CAN_DATA_LEN , MAVLINK_MSG_ID_TRANSMIT_CAN_DATA_CRC ) ; #endif }
This varient of _send() can be used to save stack space by re-using
memory from the receive buffer.
This varient of _send () can be used to save stack space by re - using memory from the receive buffer .