• Main Page
  • Data Structures
  • Files
  • File List
  • Globals

ds1302.h

Go to the documentation of this file.
00001 /* Support for DS1302 Real Time Clock
00002 
00003         DS1302 is an SPI device
00004 */
00005 
00006 /* 23/2/2011  svn 282  */
00007 
00008 #ifndef DS1302_H
00009 #define DS1302_H
00010 
00011 #include <avr/io.h>
00012 #include <config.h>
00013 
00014 
00015 
00016 
00017 
00025 void read_from_rtc(uint8_t command,uint8_t bytes,uint8_t* address_ptr);
00026 
00027 
00028 
00038 void write_to_rtc(uint8_t command,uint8_t bytes,uint8_t* data_ptr);
00039 
00040 
00041 
00048 void send_time_to_rtc(uint8_t* time_ptr);
00049 
00050 
00051 
00052 
00059 void read_time(uint8_t* address_ptr);
00060 
00061 
00062 
00072 uint8_t bcd_to_hex(uint8_t bcd);
00073 
00074 
00075 
00086 uint32_t get_fattime(void);
00087 
00088 
00089 
00106 void date_dirname(uint8_t *time_store,uint8_t *dirname);
00107 
00108 
00109 
00129  void filename_from_date(uint8_t *time_store,uint8_t *filename);
00130 
00131 
00132 
00143 void iso_time(uint8_t *time_store,uint8_t *iso_time_store);
00144 
00145 
00146 
00151 void set_datetime(uint8_t *iso_time_store);
00152 
00153 
00154 
00161 uint8_t hex2ascii_h(uint8_t hexval);
00162 
00163 
00164 
00171 uint8_t hex2ascii_l(uint8_t hexval);
00172 
00173 
00174 #endif
00175 

Generated on Fri Sep 2 2011 09:12:08 by  doxygen 1.7.1