RTEMS: bsps/arm/atsam/contrib/libraries/libchip/source/rtt.c File Reference

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Functions
rtt.c File Reference
`#include "chip.h"`
`#include <assert.h>`

## Functions
void | RTT_SetPrescaler (Rtt *rtt, uint16_t prescaler)
| Changes the prescaler value of the given RTT and restarts it.
uint32_t | RTT_GetTime (Rtt *rtt)
| Returns the current value of the RTT timer value.
void | RTT_EnableIT (Rtt *rtt, uint32_t sources)
| Enables the specified RTT interrupt sources.
uint32_t | RTT_GetStatus (Rtt *rtt)
| Returns the status register value of the given RTT.
void | RTT_SetAlarm (Rtt *pRtt, uint32_t time)
| Configures the RTT to generate an alarm at the given time.

## Detailed Description

Implementation of Real Time Timer (RTT) controller.

## Function Documentation

## ◆ RTT_EnableIT()

void RTT_EnableIT | ( | Rtt * | rtt,
|  | uint32_t | sources
| ) |  |

Enables the specified RTT interrupt sources.

Parameters

  rtt | Pointer to a Rtt instance.
  sources | Bitmask of interrupts to enable.

## ◆ RTT_GetStatus()

uint32_t RTT_GetStatus | ( | Rtt * | rtt | ) |

Returns the status register value of the given RTT.

Parameters

  rtt | Pointer to an Rtt instance.

## ◆ RTT_GetTime()

uint32_t RTT_GetTime | ( | Rtt * | rtt | ) |

Returns the current value of the RTT timer value.

Parameters

  rtt | Pointer to a Rtt instance.

## ◆ RTT_SetAlarm()

void RTT_SetAlarm | ( | Rtt * | pRtt,
|  | uint32_t | time
| ) |  |

Configures the RTT to generate an alarm at the given time.

Parameters

  pRtt | Pointer to an Rtt instance.
  time | Alarm time.

## ◆ RTT_SetPrescaler()

void RTT_SetPrescaler | ( | Rtt * | rtt,
|  | uint16_t | prescaler
| ) |  |

Changes the prescaler value of the given RTT and restarts it.

Note
  This function disables RTT interrupt sources.

Parameters

  rtt | Pointer to a Rtt instance.
  prescaler | Prescaler value for the RTT.