⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ds1307.h

📁 ds1307 driver by c clock chip
💻 H
字号:
#ifndef DS1307_HEAD
#define DS1307_HEAD
	#ifndef uchar 
		#define uchar unsigned char 
		#define uint  unsigned int
        #define ulong unsigned long
	#endif

	#ifndef ID_OK
		#define ID_OK 	0
		#define ID_ERR 	1
	#endif

	
	#define DS1307_DEVICEADDR  0xd0

	

	//读写任意位置ram
	extern uchar Ds1307ReadRam(uchar addr,uchar *Buffer,uchar Length);
	extern uchar Ds1307WriteRam(uchar addr,uchar *Buffer,uchar Length);	

	//初始化时钟芯片
	extern uchar Ds1307Init(void);

	//声音及模式
	extern uchar ReadSpeakMode(uchar *mode);
	extern uchar SetSpeakMode(uchar mode);
	extern uchar open_speak();
	extern uchar close_speak();

	//读写时间信息
	//time[]={century year month day hour minute seconds week}
	extern uchar read_alltime(uchar *time);
	//time[]={century year month day hour minute seconds week}
	extern uchar  write_alltime(uchar *time);



#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -