RTEMS  5.1
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. More...
 
int bsp_rtc_set_time (const rtems_time_of_day *tod)
 Sets the information according to the current time. More...
 
bool bsp_rtc_probe (void)
 Used to probe. At the moment is not used. More...
 

Variables

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

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
}
void bsp_rtc_initialize(void)
Initialize the rtc device.
Definition: rtc-config.c:35
int bsp_rtc_set_time(const rtems_time_of_day *tod)
Sets the information according to the current time.
Definition: rtc-config.c:77
int bsp_rtc_get_time(rtems_time_of_day *tod)
Gets the information according to the current time.
Definition: rtc-config.c:58

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
}
}
bool bsp_rtc_probe(void)
Used to probe. At the moment is not used.
Definition: rtc-config.c:94
const rtc_fns lpc176x_rtc_ops
Represents the real time clock options.
Definition: rtc-config.c:102
#define NULL
Requests a GPIO pin group configuration.
Definition: bestcomm_api.h:77

Table to describes the rtc device.