ECE 486 Support Libraries
Sample buffers for data transfers to/from ADC/DAC

Macros

#define DEFAULT_BLOCKSIZE   100
 Default # samples per block of streamed ADC/DAC data. More...
 

Variables

uint32_t ADC_Block_Size
 Number of samples user accesses per data block. More...
 
uint32_t ADC_Buffer_Size
 Total buffer size being filled by DMA for ADC/DAC. More...
 
volatile int Lower_Ready
 Flag to indicate which half of ADC buffer may be processed. More...
 
volatile uint32_t * ADC_Input_Buffer
 Buffer to store samples transfered from the ADC by a DMA. More...
 
volatile uint32_t * DAC_Output_Buffer
 Buffer to hold samples to be transfered to the DAC(s) by a DMA. More...
 

Detailed Description

Macro Definition Documentation

#define DEFAULT_BLOCKSIZE   100

Default # samples per block of streamed ADC/DAC data.

Definition at line 23 of file sample486.h.

Variable Documentation

uint32_t ADC_Block_Size

Number of samples user accesses per data block.

Definition at line 27 of file sample486.c.

uint32_t ADC_Buffer_Size

Total buffer size being filled by DMA for ADC/DAC.

Definition at line 28 of file sample486.c.

volatile uint32_t* ADC_Input_Buffer

Buffer to store samples transfered from the ADC by a DMA.

The DMA is configured to continually transfer samples from the ADC(s) into the ADC_Input_Buffer. When the buffer is half-full or full, an interrupt is generated to allow the valid samples to be translated into float values and handed to the user.

In Mono input mode, samples are 12-bits, left-aligned in the least significant 16 bits of each word of the buffer. In Stereo input mode, the least significant 16 bits holds channel 1, and the most significant 16 bits holds the channel 2 data.

Definition at line 21 of file sample486.c.

volatile uint32_t* DAC_Output_Buffer

Buffer to hold samples to be transfered to the DAC(s) by a DMA.

A DMA is configured to continually transfer samples from DAC_Output_Buffer to the DAC(s).

In Mono input mode, samples are 12-bits, left-aligned in the least significant 16 bits of each word of the buffer. In Stereo input mode, the least significant 16 bits holds channel 1, and the most significant 16 bits holds the channel 2 data.

Definition at line 22 of file sample486.c.

volatile int Lower_Ready

Flag to indicate which half of ADC buffer may be processed.

Definition at line 44 of file sample486.c.