text: /**
   * \file
   * \brief Real Time Clock Header File
   *
   * This file contains the defines, the struct and the procedure
   * signatures used to access the real time clock (the hardware
   * clock).
   */
  
  /*
   * Copyright (c) 2007, 2010, ETH Zurich.
   * All rights reserved.
   *
   * This file is distributed under the terms in the attached LICENSE file.
   * If you do not find this file, copies can be found by writing to:
   * ETH Zurich D-INFK, Universitaetstrasse 6, CH-8092 Zurich. Attn: NetOS Group.
   */
  
  #ifndef RTC_H_
  #define RTC_H_
  
  /** \struct rtc_time rtc.h <rtc.h>
      \brief Time structure.
      This structure is used to get the current RTC time
  */
  
  struct rtc_time {
      uint8_t hr; /**< current hour */
      uint8_t min; /**< current minute */
      uint8_t sec; /**< current second */
  };
  
  void rtc_read(struct rtc_time *t);
  void rtc_print(struct rtc_time *t);
  void rtc_write_cmos(int addr, uint8_t b);
  void rtc_write_extended(int addr, uint8_t b);
  uint8_t rtc_read_cmos(int addr);
  uint8_t rtc_read_extended(int addr, uint8_t b);
  uint8_t rtc_read_secs(void);
  void rtc_init(void);
  
  #endif // RTC_H_
  