summaryrefslogtreecommitdiffstats
path: root/c/src/libchip/rtc/rtc.h
diff options
context:
space:
mode:
authorThomas Doerfler <Thomas.Doerfler@embedded-brains.de>2008-09-22 11:45:25 +0000
committerThomas Doerfler <Thomas.Doerfler@embedded-brains.de>2008-09-22 11:45:25 +0000
commit31c14d9043a3a06ba49a71f17786b2d007d89f71 (patch)
tree9b2de4f759e97bde420e44a7e6639349480baaff /c/src/libchip/rtc/rtc.h
parentcorrect DEC clock rate for non-U-Boot case (diff)
downloadrtems-31c14d9043a3a06ba49a71f17786b2d007d89f71.tar.bz2
Include required header files. Some internal functions have now static linkage type. Added constant qualifier to operations table and read-only function parameters.
Diffstat (limited to '')
-rw-r--r--c/src/libchip/rtc/rtc.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/c/src/libchip/rtc/rtc.h b/c/src/libchip/rtc/rtc.h
index f044721bec..106533dd3b 100644
--- a/c/src/libchip/rtc/rtc.h
+++ b/c/src/libchip/rtc/rtc.h
@@ -15,6 +15,11 @@
#ifndef __LIBCHIP_RTC_h
#define __LIBCHIP_RTC_h
+#include <stdbool.h>
+#include <stdint.h>
+
+#include <rtems.h>
+
/*
* Types for get and set register routines
*/
@@ -26,7 +31,7 @@ typedef void (*setRegister_f)(
typedef struct _rtc_fns {
void (*deviceInitialize)(int minor);
int (*deviceGetTime)(int minor, rtems_time_of_day *time);
- int (*deviceSetTime)(int minor, rtems_time_of_day *time);
+ int (*deviceSetTime)(int minor, const rtems_time_of_day *time);
} rtc_fns;
typedef enum {
@@ -50,8 +55,6 @@ typedef enum {
*
* ulCtrlPort1 This is the primary control port number for the device.
*
- * ulCtrlPort2 This is the secondary control port number.
- *
* ulDataPort This is the port number for the data port of the device
*
* getRegister This is the routine used to read register values.
@@ -60,9 +63,9 @@ typedef enum {
*/
typedef struct _rtc_tbl {
- char *sDeviceName;
+ const char *sDeviceName;
rtc_devs deviceType;
- rtc_fns *pDeviceFns;
+ const rtc_fns *pDeviceFns;
bool (*deviceProbe)(int minor);
void *pDeviceParams;
uint32_t ulCtrlPort1;