/* Send data visualizer data packet with 1 data field. 
This routine constructs a data visualizer data packet with one data value field and then transmits it. All multi-byte transmitted values use little endian byte order. */
void adv_data_send_1(uint8_t stream_num, uint32_t timestamp, int32_t value)
/* Send data visualizer data packet with 1 data field. 
This routine constructs a data visualizer data packet with one data value field and then transmits it. All multi-byte transmitted values use little endian byte order. */
void adv_data_send_1(uint8_t stream_num, uint32_t timestamp, int32_t value)
{
	struct {
		adv_data_start_t start;
		adv_data_field_t field;
		adv_data_end_t end;
	} packet;
	packet.start.header1 = ADV_PKT_HEADER_1;
	packet.start.header2 = ADV_PKT_HEADER_2;
	packet.start.length  = cpu_to_le16(sizeof(packet));
	packet.start.type    = ADV_PKT_DATA;
	packet.start.stream_num = stream_num;
	packet.start.time_stamp = cpu_to_le32(timestamp);
	packet.field.value = cpu_to_le32(value);
	packet.end.crc = 0x00;
	packet.end.mark = ADV_PKT_END;
	adv_write_buf((uint8_t*)&packet, sizeof(packet));
}