µGFX  2.9
version 2.9
Driver

Detailed Description

Driver interface for the GADC module.

Data Structures

struct  GadcTimerJob_t
 The structure passed to start a timer conversion. More...
 
struct  GadcNonTimerJob_t
 The structure passed to do a single conversion. More...
 

Functions

void gadc_lld_init (void)
 Initialise the driver. More...
 
gMemSize gadc_lld_samplesperconversion (gU32 physdev)
 Using the hardware dependant "physdev", return the number of samples for each conversion. More...
 
void gadc_lld_start_timerI (gU32 freq)
 Start a periodic timer for high frequency conversions. More...
 
void gadc_lld_stop_timerI (void)
 Stop the periodic timer for high frequency conversions. More...
 
void gadc_lld_timerjobI (GadcTimerJob *pjob)
 Start a set of high frequency conversions. More...
 
void gadc_lld_nontimerjobI (GadcNonTimerJob *pjob)
 Start a non-timer conversion. More...
 
typedef struct GadcTimerJob_t GadcTimerJob
 The structure passed to start a timer conversion. More...
 
typedef struct GadcNonTimerJob_t GadcNonTimerJob
 The structure passed to do a single conversion. More...
 
void gadcGotDataI (gMemSize n)
 These routines are the callbacks that the driver uses. More...
 

Function Documentation

◆ gadc_lld_init()

void gadc_lld_init ( void  )

Initialise the driver.

Function Class: Normal API, this function can be invoked by regular system threads.

◆ gadc_lld_nontimerjobI()

void gadc_lld_nontimerjobI ( GadcNonTimerJob pjob)

Start a non-timer conversion.

Note
This will only be called if the ADC should be ready for a new job.
Parameters
[in]pjobThe job to be started
Function Class: Normal API, this function can be invoked by regular system threads.
Function Class: This is an I-Class API, this function can be invoked from within a system lock zone by both threads and interrupt handlers.

◆ gadc_lld_samplesperconversion()

gMemSize gadc_lld_samplesperconversion ( gU32  physdev)

Using the hardware dependant "physdev", return the number of samples for each conversion.

Parameters
[in]physdevThe hardware dependent physical device descriptor
Returns
The number of samples per conversion
Function Class: Normal API, this function can be invoked by regular system threads.

◆ gadc_lld_start_timerI()

void gadc_lld_start_timerI ( gU32  freq)

Start a periodic timer for high frequency conversions.

Parameters
[in]freqThe frequency for the timer
Note
This will only be called if the timer is currently stopped.
Function Class: Normal API, this function can be invoked by regular system threads.
Function Class: This is an I-Class API, this function can be invoked from within a system lock zone by both threads and interrupt handlers.

◆ gadc_lld_stop_timerI()

void gadc_lld_stop_timerI ( void  )

Stop the periodic timer for high frequency conversions.

Note
This will only be called if the timer is currently running and all timer jobs have been completed/aborted.
Function Class: Normal API, this function can be invoked by regular system threads.
Function Class: This is an I-Class API, this function can be invoked from within a system lock zone by both threads and interrupt handlers.

◆ gadc_lld_timerjobI()

void gadc_lld_timerjobI ( GadcTimerJob pjob)

Start a set of high frequency conversions.

Note
This will only be called if the timer is currently running and the ADC should be ready for a new job.
Parameters
[in]pjobThe job to be started.
Function Class: Normal API, this function can be invoked by regular system threads.
Function Class: This is an I-Class API, this function can be invoked from within a system lock zone by both threads and interrupt handlers.

◆ gadcGotDataI()

void gadcGotDataI ( gMemSize  n)

These routines are the callbacks that the driver uses.

Defined in the high level GADC code.

Function Class: Not an API, this function is for internal use only.

Indicate that some data has been placed into the buffer for the current job

Parameters
[in]nThe number of samples placed in the buffer
Note
Calling this with n = 0 causes the current job to be terminated early or aborted. It can be called in this mode on an ADC conversion error. Any job will then be restarted by the high level code as appropriate.

Typedef Documentation

◆ GadcNonTimerJob

The structure passed to do a single conversion.

◆ GadcTimerJob

typedef struct GadcTimerJob_t GadcTimerJob

The structure passed to start a timer conversion.