[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Real Time Clock



Hi,

I tried to write a shell command to read and set the real time clock (RTC).
Unfortunately this is currently impossible to achieve within the cpukit.  One
solution would be to extend the default RTC driver interface in
cpukit/libcsupport/include/rtc.h:

#define RTC_DEVICE_NAME "/dev/rtc"

#define RTC_DRIVER_TABLE_ENTRY \
  { rtc_initialize, NULL, NULL, rtc_read, rtc_write, NULL }

rtems_device_driver rtc_initialize(
  rtems_device_major_number,
  rtems_device_minor_number,
  void *
);

rtems_device_driver rtc_read(
  rtems_device_major_number,
  rtems_device_minor_number,
  void *
);

rtems_device_driver rtc_write(
  rtems_device_major_number,
  rtems_device_minor_number,
  void *
);

The read and write function would read or set the RTC with a rtems_time_of_day
structure argument.

Have a nice day!

-- 
Sebastian Huber, Embedded Brains GmbH

Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone   : +49 89 18 90 80 79-6
Fax     : +49 89 18 90 80 79-9
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request

Diese Nachricht ist keine gesch?ftliche Mitteilung im Sinne des EHUG.