AVR Printf Queue Sampler

Used to read out data from a queue on a AVR device.

The printf queue is a circular buffer stored in the AVR device's SRAM space along with some administrative functions. It consists of:
  1. 1.1 byte token.
  2. 2. 1 bytes size.
  3. 3.1 byte write index.
  4. 4.1 byte read index.
  5. 5.(2^size)-4 bytes circular buffer.

The printf queue sampler reads available bytes from the read index and sends data to the host computer.

Table 1. AVR Printf Queue Sampler
Field Size Description
DATA_SAMPLER 1 byte 0x8A
SAMPLE_PRINTF_QUEUE_AVR 1 byte 0x0D
ENABLE 1 byte

0x00: disable

0x01: enable

ADDRESS 2 bytes Start address of queue structure to poll, MSB first
FLAGS 4 byte
Bits 1:0: destination:
  • b00: send to DGI as data
  • b01: send to HID (reserved)
  • b10: send to DGI as print
  • b11: reserved

Response:

Table 2. AVR Printf Queue Sampler Response
Field Size Description
DATA_SAMPLER 1 byte 0x8A
SAMPLE_PRINTF_QUEUE_AVR 1 byte 0x0D
Status 1 byte

Status code

0x00: OK

0xFF: Error

Note: This feature is in a beta stage and should be used with caution.