ECE 486 Support Libraries
sample486.c File Reference

Implementation of user sampler interface functions. More...

#include "stm32l4xx_hal.h"
#include "stm32l476g_discovery.h"
#include <stdlib.h>
#include "sample486.h"
#include "err486.h"
#include "arm_math.h"

Go to the source code of this file.

Functions

int getblocksize ()
 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 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...
 
void getblockstereo (float *chan1, float *chan2)
 Request a block of data from the two ADC sample streams (Stereo input case) More...
 
void HAL_ADC_ConvCpltCallback (ADC_HandleTypeDef *hadc)
 
void HAL_ADC_ConvHalfCpltCallback (ADC_HandleTypeDef *hadc)
 

Variables

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

Detailed Description

Implementation of user sampler interface functions.

Author
Don Hummels
Date
Jan 2016

Definition in file sample486.c.

Function Documentation

void HAL_ADC_ConvCpltCallback ( ADC_HandleTypeDef *  hadc)

Definition at line 220 of file sample486.c.

void HAL_ADC_ConvHalfCpltCallback ( ADC_HandleTypeDef *  hadc)

Definition at line 241 of file sample486.c.

Variable Documentation

volatile uint32_t* inbuf
static

Definition at line 50 of file sample486.c.

volatile uint32_t* outbuf
static

Definition at line 51 of file sample486.c.