Initialization routines and debug utilities


Data Structures

struct  PWMdatastruct
struct  Countdatastruct
struct  DtoAdatastruct

Functions

int init (void)
int PWM_Ipac_Init (void)
int PWM_Ipac (int ict, int duty, unsigned long frequency)
int Counter_Ipac (int ict, u8 trigger, u16 load, count_callback callback, void *privatedata, u8 flags)
int DtoA_pwm (int dac, int output)
int DtoA_Set (int dac, int percent)
int rc (void)

Detailed Description

The IPAC module provides some high level calls to the other drivers.

Function Documentation

int Counter_Ipac int  ict,
u8  trigger,
u16  load,
count_callback  callback,
void *  privatedata,
u8  flags
 

Configure and start a 16 bit down counter Currently this function is just used to set up IC counters. It configures an ICT to be a counter, starts it, and stores the information about it in CountData[IOCNUMPORTS] For a more in depth discussion of the callback/trigger/flags see the IOC module

Parameters:
ict The ICT to use for a counter
trigger the edge trigger to count on
load The initial value to load as well as the reload value if auto-reload is on
callback the zero crossing callback to use. Set this to NULL if no callback is desired.
privatedata void pointer to data passed to the callback
flags counter flags
Returns:
SUCCESS or FAILURE
See also:
IOC_IC

int DtoA_pwm int  dac,
int  output
 

Change the output % of a filtered pwm DtoA

Parameters:
dac the dac to use 0 or 1
output the output percentage 0-100
Returns:
SUCCESS

int DtoA_Set int  dac,
int  percent
 

Change the output % of a general IPAC (could be either)

Parameters:
dac the dac to use, in IPAC 0-1(filtered)2-5(DtoA)
output the output percentage 0-100
Returns:
SUCCESS

int init void   ) 
 

Initializes the board This sets up and intializes: The status LED The Pll The 2 serial ports The 2 internal AtoD modules Disconnects IRQ from E1 and enables IRQ's (X is not enables) The realtime scheduler The IOC PWM data structures The IC counter data structures The DtoA data structures Starts the global down counter. Initializes the PLD Initializes the Keypad Initializes the PLL Initializes the SPI and external RTC Initializes the eeprom

int PWM_Ipac int  ict,
int  duty,
unsigned long  frequency
 

Configure and start a PWM Currently this function is just used to set up IOC PWMs. It configures an ICT to be a PWM, starts it, and stores the information about it in PWMdata[PWMSYS]

Parameters:
ict The ICT to use for a PWM
duty the PWM duty cycle
frequency the PWM frequency
Returns:
SUCCESS or FAILURE

int PWM_Ipac_Init void   ) 
 

Initialize the Ipacs PWM data structures Called by IpacInit

Returns:
SUCCESS

int rc void   ) 
 

rc "run commands" entry into the end users application


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