ECE 486 Support Libraries
sample486.h File Reference

ECE 486 Interface fuctions to manipulate blocks of sampled data. More...

Go to the source code of this file.

Macros

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

Enumerations

enum  Processor_Task { STARTUP, PROCESS_BUFFER, WAIT_FOR_NEXT_BUFFER }
 keep track of whether a user is working on a buffer, or waiting for the next buffer More...
 

Functions

int getblocksize (void)
 Return the number of samples that the user should expect to process per block. More...
 
void setblocksize (uint32_t blksiz)
 Set the number of samples that the user should expect to process per block. More...
 
void getblock (float *working)
 Request a block of data from the ADC sample stream. More...
 
void getblockstereo (float *chan1, float *chan2)
 Request a block of data from the two ADC sample streams (Stereo input case) More...
 
void putblock (float *working)
 Send a buffer of data to the DAC output stream. More...
 
void putblockstereo (float *chan1, float *chan2)
 Send two buffers of data to the DACs for stereo output. 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...
 
enum Processor_Task volatile Sampler_Status
 

Detailed Description

ECE 486 Interface fuctions to manipulate blocks of sampled data.

Author
Don Hummels
Date
Jan 2016

Interface routines that users call to handle data samples which are being streamed from the ADC and back to the DAC.

Definition in file sample486.h.