RTEMS 6.1-rc4
Loading...
Searching...
No Matches
Functions
rtt.h File Reference
#include "chip.h"
#include <stdint.h>

Go to the source code of this file.

Functions

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

Detailed Description

Purpose

Interface for Real Time Timer (RTT) controller.

Usage
  1. Changes the prescaler value of the given RTT and restarts it using RTT_SetPrescaler().
  2. Get current value of the RTT using RTT_GetTime().
  3. Enables the specified RTT interrupt using RTT_EnableIT().
  4. Get the status register value of the given RTT using RTT_GetStatus().
  5. Configures the RTT to generate an alarm at the given time using RTT_SetAlarm().

Function Documentation

◆ RTT_EnableIT()

void RTT_EnableIT ( Rtt rtt,
uint32_t  sources 
)

Enables the specified RTT interrupt sources.

Parameters
rttPointer to a Rtt instance.
sourcesBitmask of interrupts to enable.

◆ RTT_GetStatus()

uint32_t RTT_GetStatus ( Rtt rtt)

Returns the status register value of the given RTT.

Parameters
rttPointer to an Rtt instance.

◆ RTT_GetTime()

uint32_t RTT_GetTime ( Rtt rtt)

Returns the current value of the RTT timer value.

Parameters
rttPointer 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
pRttPointer to an Rtt instance.
timeAlarm 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
rttPointer to a Rtt instance.
prescalerPrescaler value for the RTT.