Software Drivers

xscutimer.c File Reference

#include "xscutimer.h"

Functions

int XScuTimer_CfgInitialize (XScuTimer *InstancePtr, XScuTimer_Config *ConfigPtr, u32 EffectiveAddress)
void XScuTimer_Start (XScuTimer *InstancePtr)
void XScuTimer_Stop (XScuTimer *InstancePtr)
void XScuTimer_SetPrescaler (XScuTimer *InstancePtr, u8 PrescalerValue)
u8 XScuTimer_GetPrescaler (XScuTimer *InstancePtr)

Detailed Description

Contains the implementation of interface functions of the SCU Timer driver. See xscutimer.h for a description of the driver.

 MODIFICATION HISTORY:
 Ver   Who Date     Changes
 ----- --- -------- ---------------------------------------------
 1.00a nm  03/10/10 First release
 

Function Documentation

int XScuTimer_CfgInitialize ( XScuTimer InstancePtr,
XScuTimer_Config ConfigPtr,
u32  EffectiveAddress 
)

Initialize a specific timer instance/driver. This function must be called before other functions of the driver are called.

Parameters:
InstancePtr is a pointer to the XScuTimer instance.
ConfigPtr points to the XScuTimer configuration structure.
EffectiveAddress is the base address for the device. It could be a virtual address if address translation is supported in the system, otherwise it is the physical address.
Returns:
  • XST_SUCCESS if initialization was successful.
  • XST_DEVICE_IS_STARTED if the device has already been started.
Note:
None.
u8 XScuTimer_GetPrescaler ( XScuTimer InstancePtr  ) 

This function returns the current prescaler value.

Parameters:
InstancePtr is a pointer to the XScuTimer instance.
Returns:
The prescaler value.
Note:
None.
void XScuTimer_SetPrescaler ( XScuTimer InstancePtr,
u8  PrescalerValue 
)

This function sets the prescaler bits in the timer control register.

Parameters:
InstancePtr is a pointer to the XScuTimer instance.
PrescalerValue is a 8 bit value that sets the prescaler to use.
Returns:
None
Note:
None
void XScuTimer_Start ( XScuTimer InstancePtr  ) 

Start the timer.

Parameters:
InstancePtr is a pointer to the XScuTimer instance.
Returns:
None.
Note:
None.
void XScuTimer_Stop ( XScuTimer InstancePtr  ) 

Stop the timer.

Parameters:
InstancePtr is a pointer to the XScuTimer instance.
Returns:
None.
Note:
None.