RTEMS 6.1-rc4
Loading...
Searching...
No Matches
Macros | Functions | Variables
rtc-config.c File Reference

RTC configuration. More...

#include <libchip/rtc.h>
#include <bsp/io.h>

Macros

#define LPC176X_RTC_NUMBER   1U
 

Functions

void bsp_rtc_initialize (void)
 Initialize the rtc device.
 
int bsp_rtc_get_time (rtems_time_of_day *tod)
 Gets the information according to the current time.
 
int bsp_rtc_set_time (const rtems_time_of_day *tod)
 Sets the information according to the current time.
 
bool bsp_rtc_probe (void)
 Used to probe. At the moment is not used.
 

Variables

const rtc_fns lpc176x_rtc_ops
 Represents the real time clock options.
 
size_t RTC_Count = LPC176X_RTC_NUMBER
 
rtc_tbl RTC_Table [LPC176X_RTC_NUMBER]
 Table to describes the rtc device.
 

Detailed Description

RTC configuration.

Function Documentation

◆ bsp_rtc_get_time()

int bsp_rtc_get_time ( rtems_time_of_day tod)

Gets the information according to the current time.

Parameters
todValue to be modified.
Returns
0

◆ bsp_rtc_probe()

bool bsp_rtc_probe ( void  )

Used to probe. At the moment is not used.

Returns
true.

◆ bsp_rtc_set_time()

int bsp_rtc_set_time ( const rtems_time_of_day tod)

Sets the information according to the current time.

Parameters
todValue to get the new information.
Returns
0

Variable Documentation

◆ lpc176x_rtc_ops

const rtc_fns lpc176x_rtc_ops
Initial value:
= {
.deviceInitialize = (void *) bsp_rtc_initialize,
.deviceGetTime = (void *) bsp_rtc_get_time,
.deviceSetTime = (void *) bsp_rtc_set_time
}
int bsp_rtc_get_time(rtems_time_of_day *tod)
Gets the information according to the current time.
Definition: rtc-config.c:71
void bsp_rtc_initialize(void)
Initialize the rtc device.
Definition: rtc-config.c:48
int bsp_rtc_set_time(const rtems_time_of_day *tod)
Sets the information according to the current time.
Definition: rtc-config.c:90

Represents the real time clock options.

◆ RTC_Table

rtc_tbl RTC_Table[LPC176X_RTC_NUMBER]
Initial value:
= {
{
.sDeviceName = "/dev/rtc",
.deviceType = RTC_CUSTOM,
.pDeviceFns = &lpc176x_rtc_ops,
.deviceProbe = (void *) bsp_rtc_probe,
.pDeviceParams = NULL,
.ulCtrlPort1 = 0,
.ulDataPort = 0,
.getRegister = NULL,
.setRegister = NULL
}
}
const rtc_fns lpc176x_rtc_ops
Represents the real time clock options.
Definition: rtc-config.c:115
bool bsp_rtc_probe(void)
Used to probe. At the moment is not used.
Definition: rtc-config.c:107

Table to describes the rtc device.