ADC 7.0

- Main Page
- Related Pages
- Classes
- Files

- Class List
- Class Index
- Class Members

All Classes Functions Variables Pages
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
RingBufferDMA Class Reference

`#include <RingBufferDMA.h>`

## Public Member Functions
| RingBufferDMA (volatile int16_t *elems, uint32_t len, uint8_t ADC_num=0)
| Constructor, buffer has a size len and stores the conversions of ADC number ADC_num.
| ~RingBufferDMA ()
| Destructor.
bool | isFull ()
| Returns true if the buffer is full.
bool | isEmpty ()
| Returns true if the buffer is empty.
int16_t | read ()
| Read a value from the buffer, make sure it's not emtpy by calling isEmpty() first.
void | start ()
| Start DMA operation.
void | void_isr ()
| This function will be called when a DMA transfer finishes.

## Static Public Member Functions
static void | call_dma_isr (void)

## Public Attributes
DMAChannel * | dmaChannel
| DMAChannel to handle all low level DMA code.
volatile int16_t *const | p_elems
| Pointer to the elements of the buffer.
uint16_t | b_size
| Size of buffer.
uint8_t | ADC_number
| ADC module of the instance.

## Static Public Attributes
static RingBufferDMA * | static_ringbuffer_dma

## Detailed Description

Class RingBufferDMA implements a circular buffer of fixed size (must be power of 2) Code adapted from http://en.wikipedia.org/wiki/Circular_buffer#Mirroring

The documentation for this class was generated from the following files:

- RingBufferDMA.h
- RingBufferDMA.cpp