#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
- Changes the prescaler value of the given RTT and restarts it using RTT_SetPrescaler().
- Get current value of the RTT using RTT_GetTime().
- Enables the specified RTT interrupt using RTT_EnableIT().
- Get the status register value of the given RTT using RTT_GetStatus().
- Configures the RTT to generate an alarm at the given time using RTT_SetAlarm().
Definition in file rtt.h.
Function Documentation
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. |
Definition at line 107 of file rtt.c.
uint32_t RTT_GetStatus |
( |
Rtt * |
rtt |
) |
|
Returns the status register value of the given RTT.
- Parameters:
-
| rtt | Pointer to an Rtt instance. |
Definition at line 118 of file rtt.c.
uint32_t RTT_GetTime |
( |
Rtt * |
rtt |
) |
|
Returns the current value of the RTT timer value.
- Parameters:
-
| rtt | Pointer to a Rtt instance. |
Definition at line 96 of file rtt.c.
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. |
Definition at line 129 of file rtt.c.
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. |
Definition at line 86 of file rtt.c.