Changeset 22ed4172 in rtems


Ignore:
Timestamp:
May 27, 2009, 2:23:23 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
8d64f08e
Parents:
72fe607
Message:

2009-05-27 Sebastian Huber <sebastian.huber@…>

  • libcsupport/include/rtc.h: New RTC driver interface.
  • libmisc/Makefile.am, libmisc/shell/shellconfig.h: Added RTC command.
  • libmisc/shell/main_rtc.c: New file.
Location:
cpukit
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r72fe607 r22ed4172  
     12009-05-27      Sebastian Huber <sebastian.huber@embedded-brains.de>
     2
     3        * libcsupport/include/rtc.h: New RTC driver interface.
     4        * libmisc/Makefile.am, libmisc/shell/shellconfig.h: Added RTC command.
     5        * libmisc/shell/main_rtc.c: New file.
     6
    172009-05-21      Joel Sherrill <joel.sherrill@OARcorp.com>
    28
  • cpukit/libcsupport/include/rtc.h

    r72fe607 r22ed4172  
    11/**
    2  *  @file rtems/rtc.h
     2 * @file
    33 *
    4  *  This file describes the Real-Time Clock driver for all boards.
    5  *  This driver provides support for the standard RTEMS routines
    6  *  that set the tod based on an RTC.
     4 * Real-time clock driver interface.
    75 */
    86 
     
    2119#define _RTEMS_RTC_H
    2220
     21#include <rtems.h>
     22
    2323#ifdef __cplusplus
    2424extern "C" {
    2525#endif
    2626
     27/**
     28 * @defgroup rtems_rtc Real-Time Clock Driver Interface
     29 *
     30 * This driver interface provides support to read and set the real-time clock
     31 * and to initialize the time of day for the system.
     32 *
     33 * @{
     34 */
     35
     36/**
     37 * Device file name path.
     38 */
     39#define RTC_DEVICE_NAME "/dev/rtc"
     40
     41/**
     42 * Device driver table entry.
     43 */
    2744#define RTC_DRIVER_TABLE_ENTRY \
    28   { rtc_initialize, NULL, NULL, NULL, NULL, NULL }
     45  { rtc_initialize, rtc_open, rtc_close, \
     46    rtc_read, rtc_write, rtc_control }
    2947
     48/**
     49 * Initializes the real-time clock device and sets the time of day for the
     50 * system.
     51 *
     52 * If the real-time clock provides an invalid time of day value the system time
     53 * of day must remain untouched.
     54 */
    3055rtems_device_driver rtc_initialize(
    3156  rtems_device_major_number,
     
    3459);
    3560
     61/**
     62 * Opens the real-time clock device.
     63 */
     64rtems_device_driver rtc_open(
     65  rtems_device_major_number,
     66  rtems_device_minor_number,
     67  void *
     68);
     69
     70/**
     71 * Closes the real-time clock device.
     72 */
     73rtems_device_driver rtc_close(
     74  rtems_device_major_number,
     75  rtems_device_minor_number,
     76  void *
     77);
     78
     79/**
     80 * Reads the real-time clock value.
     81 *
     82 * The value will be returned in a @ref rtems_time_of_day structure.
     83 */
     84rtems_device_driver rtc_read(
     85  rtems_device_major_number,
     86  rtems_device_minor_number,
     87  void *
     88);
     89
     90/**
     91 * Sets the real-time clock value.
     92 *
     93 * The value will be set from a @ref rtems_time_of_day structure.
     94 */
     95rtems_device_driver rtc_write(
     96  rtems_device_major_number,
     97  rtems_device_minor_number,
     98  void *
     99);
     100
     101/**
     102 * Controls the real-time clock.
     103 */
     104rtems_device_driver rtc_control(
     105  rtems_device_major_number,
     106  rtems_device_minor_number,
     107  void *
     108);
     109
     110/** @} */
     111
    36112#ifdef __cplusplus
    37113}
     
    39115
    40116#endif
    41 /* end of include file */
  • cpukit/libmisc/Makefile.am

    r72fe607 r22ed4172  
    8787    shell/fts.c shell/print_heapinfo.c shell/main_wkspaceinfo.c \
    8888    shell/shell_script.c shell/login_prompt.c shell/login_check.c \
    89     shell/fdisk.c
     89    shell/fdisk.c shell/main_rtc.c
    9090if LIBNETWORKING
    9191libshell_a_SOURCES += shell/main_mount_ftp.c shell/main_mount_tftp.c \
  • cpukit/libmisc/shell/shellconfig.h

    r72fe607 r22ed4172  
    5656extern rtems_shell_cmd_t rtems_shell_FDISK_Command;
    5757
     58extern rtems_shell_cmd_t rtems_shell_RTC_Command;
     59
    5860extern rtems_shell_cmd_t rtems_shell_HALT_Command;
    5961extern rtems_shell_cmd_t rtems_shell_CPUUSE_Command;
     
    367369        &rtems_shell_NETSTATS_Command,
    368370      #endif
     371    #endif
     372
     373    /* Miscanellous shell commands */
     374    #if (defined(CONFIGURE_SHELL_COMMANDS_ALL) \
     375          && !defined(CONFIGURE_SHELL_NO_COMMAND_RTC)) \
     376        || defined(CONFIGURE_SHELL_COMMAND_RTC)
     377      &rtems_shell_RTC_Command,
    369378    #endif
    370379
Note: See TracChangeset for help on using the changeset viewer.