ds1302程序-stm.doc


文档分类:IT计算机 | 页数:约18页 举报非法文档有奖
1/18
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/18
文档列表 文档介绍
/******************************************************************************
* File name --> <strong><font color="#FF0000">ds1302</font></strong>.c
* Author    --> By Sam Chan
* Version   -->
* Date      --> 08 - 23 - 2012
* Brief     --> 时钟芯片DS1302驱动
*
* Copyright (C) 20**
* All rights reserved
*******************************************************************************
*
*                                  File Update
* Version   -->
* Author    --> By Sam Chan
* Date      --> 10 - 20 - 2013
* Revise    --> A、增加对STM32控制的移植支持
*            --> B、增加对置的RAM操作相关函数
*            --> C、增加检测DS1302是否存在,是否第一次上电检测函数
*            --> D、增加对DS1302置的锂电池充电寄存器参数设置函数和结构体
*
******************************************************************************/
 
#include ""
 
/******************************************************************************
                                  定义变量
******************************************************************************/
#define Date
#define Min 
#define Sec 
#define Hour
#define Week
#define Month
#define Year
 
Time_Typedef TimeValue;        //定义时间数据指针
 
void Time_Init()
{
        =24;
        =6;
        =12;
        =5;
        =0;
        =2;
        =16;
}
 
Charge_Typedef ChargeValue;        //定义充电寄存器
 
/******************************************************************************
* Function Name --> GPIO初始化
* Description   --> none
* Input         --> none
* Output        --> none
* Reaturn       --> none
******************************************************************************/
 
 
void DS1302_GPIOInit(void)
{
        GPIO_InitTypeDef GPIO_InitStructure;
 
        RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC, ENABLE); 

ds1302程序-stm 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数18
  • 收藏数0 收藏
  • 顶次数0
  • 上传人2786321826
  • 文件大小108 KB
  • 时间2020-12-04
最近更新