没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
/*******************************************************************************
** ???t??3? : ds3231.c
** èí?t°?±? : 1.0
** ±àò??・?3 : RealView MDK-ARM 4.20
** ???t×÷?? :
** 1|?ü?μ?÷ : ds3231?à1?oˉêy?¨ò?
**
** (c) Copyright 2005-2011, viewtool
** http://www.viewtool.com
** All Rights Reserved
**
*******************************************************************************/
/* °üo?í・???t *****************************************************************/
#include "DS3231.h"
#include "stdio.h"
#include "stm32f10x_conf.h"
#include <stdio.h>
typedef unsigned char unchar;
typedef unsigned short ushort;
typedef unsigned int uint;
typedef unsigned long ulong;
// General defines
#undef NULL
#define NULL 0 // Used for pointer
#define FALSE 0 // Used for boolean
#define TRUE 1 // Used for boolean
** ???t??3? : ds3231.c
** èí?t°?±? : 1.0
** ±àò??・?3 : RealView MDK-ARM 4.20
** ???t×÷?? :
** 1|?ü?μ?÷ : ds3231?à1?oˉêy?¨ò?
**
** (c) Copyright 2005-2011, viewtool
** http://www.viewtool.com
** All Rights Reserved
**
*******************************************************************************/
/* °üo?í・???t *****************************************************************/
#include "DS3231.h"
#include "stdio.h"
#include "stm32f10x_conf.h"
#include <stdio.h>
typedef unsigned char unchar;
typedef unsigned short ushort;
typedef unsigned int uint;
typedef unsigned long ulong;
// General defines
#undef NULL
#define NULL 0 // Used for pointer
#define FALSE 0 // Used for boolean
#define TRUE 1 // Used for boolean
// General type defines
#define BOOL unsigned int // 1 Bit variable
#define UCHAR unsigned char // 8 Bit variable
#define USHORT unsigned short
#define UINT unsigned int // 32 Bit variable
#define ULONG unsigned long // 32 Bit variable
#define I2C_EE_SCL GPIO_Pin_6
#define I2C_EE_SDA GPIO_Pin_7
#define I2C_EE_SCLGPIO GPIOB
#define I2C_EE_SDAGPIO GPIOB
#define I2C_SCL_H I2C_EE_SCLGPIO->BSRR = I2C_EE_SCL
#define I2C_SCL_L I2C_EE_SCLGPIO->BRR = I2C_EE_SCL
#define I2C_SDA_H I2C_EE_SDAGPIO->BSRR = I2C_EE_SDA
#define I2C_SDA_L I2C_EE_SDAGPIO->BRR = I2C_EE_SDA
#define I2C_SDA_RD I2C_EE_SDAGPIO->IDR & I2C_EE_SDA
#define I2C_delay() asm ("nop"); asm ("nop"); asm ("nop"); asm ("nop"); asm ("nop"); asm ("nop"); \
asm ("nop"); asm ("nop"); asm ("nop"); asm ("nop"); asm ("nop"); asm ("nop"); \
asm ("nop"); asm ("nop"); asm ("nop"); asm ("nop"); asm ("nop"); asm ("nop"); \
asm ("nop"); asm ("nop"); asm ("nop"); asm ("nop"); asm ("nop"); asm ("nop"); \
asm ("nop"); asm ("nop"); asm ("nop"); asm ("nop"); asm ("nop"); asm ("nop"); \
asm ("nop"); asm ("nop"); asm ("nop"); asm ("nop"); asm ("nop"); asm ("nop");
剩余10页未读,继续阅读
资源评论
qq_39784121
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功