Microchip® Advanced Software Framework

inertial_visualizer/data_visualizer.c File Reference

Atmel Data Visualizer tool support routines.

This file contains routines for using the Atmel Data Visualizer tool. Various functions and structure definitions provide initialization, data formatting, and actual transmission of application data to a remote host for display.

The Atmel Data Visualizer (ADV) tool is a standalone Windows application that provides a graphical display of data sent from a remote target. It is available as a separate download. For more information on downloading and installing the ADV tool, visit Atmel Data Visualizer

Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <asf.h>
#include "data_visualizer.h"

Macros

#define PKT_XMIT_DELAY   2 /* delay after sending ADV packet (msec) */
 

Functions

void adv_data_send_1 (uint8_t stream_num, uint32_t timestamp, int32_t value)
 Send data visualizer data packet with 1 data field. More...
 
void adv_data_send_3 (uint8_t stream_num, uint32_t timestamp, int32_t value0, int32_t value1, int32_t value2)
 Send data visualizer data packet w/ 3 data fields. More...
 
 COMPILER_PACK_SET (1)
 

#define PKT_XMIT_DELAY   2 /* delay after sending ADV packet (msec) */

Referenced by COMPILER_PACK_SET().

void adv_data_send_1 ( uint8_t  stream_num,
uint32_t  timestamp,
int32_t  value 
)

Send data visualizer data packet with 1 data field.

Send Atmel 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.

Parameters
stream_numThe ID number of the visualizer data stream
timestampA 32-bit timestamp value, in microseconds
valueThe data value to include in the transmitted packet

References ADV_PKT_DATA, ADV_PKT_END, ADV_PKT_HEADER_1, ADV_PKT_HEADER_2, cpu_to_le16, and cpu_to_le32.

void adv_data_send_3 ( uint8_t  stream_num,
uint32_t  timestamp,
int32_t  value0,
int32_t  value1,
int32_t  value2 
)

Send data visualizer data packet w/ 3 data fields.

Send Atmel Data Visualizer data packet w/ 3 data fields.

This routine constructs a data visualizer data packet with three data value fields and then transmits it. All multi-byte transmitted values use little endian byte order.

Parameters
stream_numThe ID number of the visualizer data stream
timestampA 32-bit timestamp value, in microseconds
value0Data field 0 value
value1Data field 1 value
value2Data field 2 value

References ADV_PKT_DATA, ADV_PKT_END, ADV_PKT_HEADER_1, ADV_PKT_HEADER_2, cpu_to_le16, and cpu_to_le32.

COMPILER_PACK_SET ( )

References delay_ms, and PKT_XMIT_DELAY.