Analog to Digital module


Typedefs

typedef void(* ATDcallback )(int module, volatile u16 *data_array, volatile u8 *status_array, void *privatedata)

Functions

void AtoDst_sample (taskdata module)
void Install_AtoDcallback (int module, ATDcallback callback, void *privatedata)
void Remove_AtoDcallback (int module)

Detailed Description

This module is the Analog to Digital driver. It provides a sample/callback API that allows users to sample the AtoD from the background of the project.

Typedef Documentation

typedef void(* ATDcallback)(int module, volatile u16 *data_array, volatile u8 *status_array, void *privatedata)
 

analog to digital callback function. This is a type of function that can be installed as a callback to an AtoD conversion

Parameters:
module the AtoD module the callback originated from 0 or 1
*data_array a pointer to the array of data (u16 AtoD[8)
*status_array a pointer to the array of flags(u8 AtoDstatus[8)
*privatedata a void pointer that can be set to anything.
See also:
Install_AtoDcallback

Definition at line 60 of file Atod.h.


Function Documentation

void AtoDst_sample taskdata  module  ) 
 

Start an AtoD sample This function starts a single AtoD sample. When it's complete it calls it's callback if it's installed. Note that samples can be collected faster than interrupts can be processed so if your IPAC is going to do anything but collect samples it should insert a delay between samplings.

Parameters:
module the module to sample

void Install_AtoDcallback int  module,
ATDcallback  callback,
void *  privatedata
 

Install an AtoD callback This function installs a callback function which is called when an AtoD sample is completed

Parameters:
module the module to install the callback on
callback the callback function this void pointer can be set to whatever you need, it will be passed to the callback.

void Remove_AtoDcallback int  module  ) 
 

Remove an AtoD callback This function removes a callback function from an AtoD module

Parameters:
module the module to remove the callback from


Generated on Fri Mar 3 17:25:46 2006 for EMAC-HCS12-SDK by  doxygen 1.4.6