version 2.8
gadc.h File Reference
#include "../../gfx.h"
#include "gadc_lld_config.h"

Go to the source code of this file.

Data Structures

struct  GEventADC_t
 The High Speed ADC event structure. More...
 

Functions

void gadcHighSpeedInit (uint32_t physdev, uint32_t frequency)
 Initialise the high speed ADC. More...
 
GSourceHandle gadcHighSpeedGetSource (void)
 Turn on sending results to the GEVENT sub-system. More...
 
void gadcHighSpeedSetISRCallback (GADCISRCallbackFunction isrfn)
 Allow retrieving of results from the high speed ADC using an ISR callback. More...
 
void gadcHighSpeedStart (void)
 Start the high speed ADC conversions. More...
 
void gadcHighSpeedStop (void)
 Stop the high speed ADC conversions. More...
 
void gadcLowSpeedGet (uint32_t physdev, adcsample_t *buffer)
 Perform a single low speed ADC conversion. More...
 
bool_t gadcLowSpeedStart (uint32_t physdev, adcsample_t *buffer, GADCCallbackFunction fn, void *param)
 Perform a low speed ADC conversion with callback (in a thread context) More...
 
GDataBuffergadcHighSpeedGetData (delaytime_t ms)
 Get a filled buffer from the ADC. More...
 

Macros

#define GADC_HSADC_LOSTEVENT   0x0001
 The event flag values. More...
 
#define GADC_HSADC_RUNNING   0x0002
 The High Speed ADC is currently running. More...
 
#define GADC_HSADC_GOTBUFFER   0x0004
 A buffer is ready for processing. More...
 
#define GADC_HSADC_STALL   0x0008
 The High Speed ADC has stalled due to no free buffers. More...
 

Typedefs

typedef void(* GADCCallbackFunction) (adcsample_t *buffer, void *param)
 A callback function (executed in a thread context) for a low speed conversion. More...
 
typedef void(* GADCISRCallbackFunction) (void)
 A callback function (executed in an ISR context) for a high speed conversion. More...
 
typedef struct GEventADC_t GEventADC
 The High Speed ADC event structure. More...
 

Macro Definition Documentation

#define GADC_HSADC_GOTBUFFER   0x0004

A buffer is ready for processing.

Definition at line 77 of file gadc.h.

#define GADC_HSADC_LOSTEVENT   0x0001

The event flag values.

The last GEVENT_HSDADC event was lost

Definition at line 75 of file gadc.h.

#define GADC_HSADC_RUNNING   0x0002

The High Speed ADC is currently running.

Definition at line 76 of file gadc.h.

#define GADC_HSADC_STALL   0x0008

The High Speed ADC has stalled due to no free buffers.

Definition at line 78 of file gadc.h.