KugleFirmware/Libraries/Devices/MTI200/xbusmessage.c
/*!
 * \brief Format the payload of a message from a native data type to
 * raw bytes.
 */
\brief Format the payload of a message from a native data type to
raw bytes.
\ brief Format the payload of a message from a native data type to raw bytes .
static void formatPayload(uint8_t* raw, struct XbusMessage const* message)
{
	switch (message->mid)
	{
		case XMID_SetOutputConfig:
			formatOutputConfig(raw, message);
			break;
		default:
			for (int i = 0; i < message->length; ++i)
			{
				*raw++ = ((uint8_t*)message->data)[i];
			}
			break;
	}
}
static void formatPayload ( uint8_t * raw , struct XbusMessage const * message ) { switch ( message -> mid ) { case XMID_SetOutputConfig : formatOutputConfig ( raw , message ) ; break ; default : for ( int i = 0 ; i < message -> length ; ++ i ) { * raw ++ = ( ( uint8_t * ) message -> data ) [ i ] ; } break ; } }
\brief Format the payload of a message from a native data type to
 raw bytes.
\ brief Format the payload of a message from a native data type to raw bytes .