LPCOpen Platform for LPC18XX/43XX microcontrollers: CHIP: Stopwatch primitives.

| LPCOpen Platform for LPC18XX/43XX microcontrollers 18XX43XX LPCOpen Platform for the NXP LPC18XX/43XX family of Microcontrollers

- Main Page
- Modules
- Data Structures
- Files

Functions
CHIP: Stopwatch primitives.
Common components used with chip drivers

## Detailed Description

## Functions
void | StopWatch_Init (void)
| Initialize stopwatch. More...
uint32_t | StopWatch_Start (void)
| Start a stopwatch. More...
STATIC INLINE uint32_t | StopWatch_Elapsed (uint32_t startTime)
| Returns number of ticks elapsed since stopwatch was started. More...
uint32_t | StopWatch_TicksPerSecond (void)
| Returns number of ticks per second of the stopwatch timer. More...
uint32_t | StopWatch_TicksToMs (uint32_t ticks)
| Converts from stopwatch ticks to mS. More...
uint32_t | StopWatch_TicksToUs (uint32_t ticks)
| Converts from stopwatch ticks to uS. More...
uint32_t | StopWatch_MsToTicks (uint32_t mS)
| Converts from mS to stopwatch ticks. More...
uint32_t | StopWatch_UsToTicks (uint32_t uS)
| Converts from uS to stopwatch ticks. More...
STATIC INLINE void | StopWatch_DelayTicks (uint32_t ticks)
| Delays the given number of ticks using stopwatch primitives. More...
STATIC INLINE void | StopWatch_DelayMs (uint32_t mS)
| Delays the given number of mS using stopwatch primitives. More...
STATIC INLINE void | StopWatch_DelayUs (uint32_t uS)
| Delays the given number of uS using stopwatch primitives. More...

## Function Documentation

STATIC INLINE void StopWatch_DelayMs | ( | uint32_t | mS | ) |

Delays the given number of mS using stopwatch primitives.

Parameters

  mS | : Number of mS to delay

Returns
  Nothing

Definition at line 114 of file stopwatch.h.

STATIC INLINE void StopWatch_DelayTicks | ( | uint32_t | ticks | ) |

Delays the given number of ticks using stopwatch primitives.

Parameters

  ticks | : Number of ticks to delay

Returns
  Nothing

Definition at line 103 of file stopwatch.h.

STATIC INLINE void StopWatch_DelayUs | ( | uint32_t | uS | ) |

Delays the given number of uS using stopwatch primitives.

Parameters

  uS | : Number of uS to delay

Returns
  Nothing

Definition at line 126 of file stopwatch.h.

STATIC INLINE uint32_t StopWatch_Elapsed | ( | uint32_t | startTime | ) |

Returns number of ticks elapsed since stopwatch was started.

Parameters

  startTime | : Time returned by StopWatch_Start().

Returns
  Number of ticks elapsed since stopwatch was started

Definition at line 59 of file stopwatch.h.

void StopWatch_Init | ( | void |  | ) |

Initialize stopwatch.

Returns
  Nothing

Definition at line 57 of file stopwatch_18xx_43xx.c.

uint32_t StopWatch_MsToTicks | ( | uint32_t | mS | ) |

Converts from mS to stopwatch ticks.

Parameters

  mS | : Duration in mS to convert to ticks.

Returns
  Number of ticks in given number of mS

Definition at line 97 of file stopwatch_18xx_43xx.c.

uint32_t StopWatch_Start | ( | void |  | ) |

Start a stopwatch.

Returns
  Current cycle count

Definition at line 72 of file stopwatch_18xx_43xx.c.

uint32_t StopWatch_TicksPerSecond | ( | void |  | ) |

Returns number of ticks per second of the stopwatch timer.

Returns
  Number of ticks per second of the stopwatch timer

Definition at line 79 of file stopwatch_18xx_43xx.c.

uint32_t StopWatch_TicksToMs | ( | uint32_t | ticks | ) |

Converts from stopwatch ticks to mS.

Parameters

  ticks | : Duration in ticks to convert to mS.

Returns
  Number of mS in given number of ticks

Definition at line 85 of file stopwatch_18xx_43xx.c.

uint32_t StopWatch_TicksToUs | ( | uint32_t | ticks | ) |

Converts from stopwatch ticks to uS.

Parameters

  ticks | : Duration in ticks to convert to uS.

Returns
  Number of uS in given number of ticks

Definition at line 91 of file stopwatch_18xx_43xx.c.

uint32_t StopWatch_UsToTicks | ( | uint32_t | uS | ) |

Converts from uS to stopwatch ticks.

Parameters

  uS | : Duration in uS to convert to ticks.

Returns
  Number of ticks in given number of uS

Definition at line 103 of file stopwatch_18xx_43xx.c.