version 2.8
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...
 
size_t gadc_lld_samplesperconversion (uint32_t physdev)
 Using the hardware dependant "physdev", return the number of samples for each conversion. More...
 
void gadc_lld_start_timerI (uint32_t 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 (size_t n)
 These routines are the callbacks that the driver uses. More...
 

Function Documentation

void gadc_lld_init ( void  )

Initialise the driver.

Function Class:
Normal API, this function can be invoked by regular system threads.
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.
size_t gadc_lld_samplesperconversion ( uint32_t  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.
void gadc_lld_start_timerI ( uint32_t  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.
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.
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.
void gadcGotDataI ( size_t  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

The structure passed to do a single conversion.

typedef struct GadcTimerJob_t GadcTimerJob

The structure passed to start a timer conversion.