Main Page Modules Alphabetical List Data Structures File List Data Fields Globals # IXP425 Timers (IxTimersCodelet) API [IXP425 Codelets] IXP425 Timer component API. More...
## Typedefs
typedef void(* | IxTimerIsr )(void *arg)
| Timer callback prototype.
## Enumerations
enum | IxTimerId { IX_TIMER_1, IX_TIMER_2, IX_TIMER_WDOG, IX_TIMER_TS, IX_TIMER_PMU, IX_TIMER_MAX }
| Hardware timers. More...
## Functions
PUBLIC IX_STATUS | ixTimerInit (BOOL recoverFromLostStatus)
| Initialise the Timer API.
PUBLIC IX_STATUS | ixTimerBind (IxTimerId timer, IxTimerIsr isr, void *arg)
| Initialise a Timer.
PUBLIC IX_STATUS | ixTimerEnable (IxTimerId timer, UINT32 downCounter, BOOL oneShot)
| Enable a Timer.
PUBLIC IX_STATUS | ixTimerDisable (IxTimerId timer)
| Disable a Timer.
PUBLIC IX_STATUS | ixTimerDownCounterGet (IxTimerId timer, UINT32 *downCounter)
| Get the remaining time of a timer.
PUBLIC IX_STATUS | ixTimerUnbind (IxTimerId timer)
| Unregister a Timer.
PUBLIC void | ixTimerShow (void)
| Show internal counters.
PUBLIC IX_STATUS | ixTimerMemMap (void)
| Maps the timer address space.
PUBLIC void | ixTimerMemUnmap (void)
| Unmaps the timer address space.
## Detailed Description IXP425 Timer component API. These utilities provide support for enabling, triggering and disabling timers ## Typedef Documentation
IxTimerIsr
| Timer callback prototype. Definition at line 105 of file IxTimersCodelet.h.
## Enumeration Type Documentation
enum IxTimerId
  | Hardware timers. Enumeration values:
  IX_TIMER_1 | General Purpose Timer 1.
  IX_TIMER_2 | General Purpose Timer 2.
  IX_TIMER_WDOG | Watchdog Timer.
  IX_TIMER_TS | Timestamp Timer.
  IX_TIMER_PMU | XScale core PMU timer.
  IX_TIMER_MAX | Delimiter for error checking.
Definition at line 88 of file IxTimersCodelet.h.
## Function Documentation
ixTimerBind | ( | IxTimerId | timer,
|  | IxTimerIsr | isr,
|  | void * | arg
| ) |
  | Initialise a Timer. This function is called to initialise one of the timers Parameters:
  timer | (in) the timer to initialise
  isr | (in) the callback to register
  arg | (in) the parameter to be passed to the callback
Returns: IX_SUCCESS, the timer successfully initialised IX_FAIL, failed to initialize the timer
ixTimerDisable | ( | IxTimerId | timer | ) |
  | Disable a Timer. This function is called to disable a timer Parameters:
  timer | (in) the timer to disable
Returns: IX_SUCCESS, the timer successfully disabled IX_FAIL, failed to disable the timer Note: This function can be used from an interrupt context
ixTimerDownCounterGet | ( | IxTimerId | timer,
|  | UINT32 * | downCounter
| ) |
  | Get the remaining time of a timer. This function is called to get the remaining time before the next interrupt triggers If this function is used after a timer expires, the result is a negative value. Its unsigned representation is a number close to 0xfffff..... Note: Watchdog timer stops when expiring. Then the counter retrived by this function is always 0. Parameters:
  timer | (in) the timer to query
  downCounter | (out) the timer time left
Returns: IX_SUCCESS, the timer successfully queried IX_FAIL, failed to query the timer Note: This function can be used from an interrupt context
ixTimerEnable | ( | IxTimerId | timer,
|  | UINT32 | downCounter,
|  | BOOL | oneShot
| ) |
  | Enable a Timer. This function is called to enable a timer Parameters:
  timer | (in) the timer to enable
  downCounter | (in) the number of cycles between interrupts. downCounter should be a multiple of 4 for IX_TIMER_1 and IX_TIMER_2 timers. This counter is in pClock cycles (peripheral cycles) except for the IX_TIMER_PMU where the unit is in xClock cycles (processor frequency)
  oneShot | (in) the type of timer to trigger. When set to TRUE, the interrupt will fire once when the downCounter reaches 0. When set to FALSE, the interrupts will fire every `downCounter` bus cycles. FALSE is not supported for IX_TIMER_WDOG and IX_TIMER_TS timers.
Returns: IX_SUCCESS, the timer successfully enabled IX_FAIL, failed to enable the timer Note: This function can be used from an interrupt context
ixTimerInit | ( | BOOL | recoverFromLostStatus | ) |
  | Initialise the Timer API. This function must be called before and other IxTimer function. It sets up internal data structures. Parameters:
  recoverFromLostStatus | (in) set to true to enable Lost Status workaround
Returns: IX_SUCCESS, the IxTimer API successfully initialised IX_FAIL, failed to initialize the IxTimer API
ixTimerMemMap | ( | void |  | ) |
  | Maps the timer address space. This function is called in order to map the physical address space for the timer to virtual adress space Parameters:
  none |
Returns: IX_SUCCESS, the timer physical address space was mapped to virtual address space IX_FAIL, the timer physical address space failed to be mapped to virtual address space
ixTimerMemUnmap | ( | void |  | ) |
  | Unmaps the timer address space. This function is called in order to unmap the physical address space for the timer Parameters:
  none |
Returns: none
ixTimerShow | ( | void |  | ) |
  | Show internal counters. This function is called to show the internal counters icremented when Lost Status workaround is needed. Parameters:
  none |
Returns: void
ixTimerUnbind | ( | IxTimerId | timer | ) |
  | Unregister a Timer. This function is called to unregister a timer Parameters:
  timer | (in) the timer to unregister
Returns: IX_SUCCESS, the timer successfully removed IX_FAIL, failed to remove the timer
Automatically generated from sources. © Intel Corp. 2003