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

📄 sw.c

📁 基于芯片DS1302的湍流实时时钟的实现
💻 C
字号:
/**********************************************************************
* System Name		DOOR
* Source Name		sw.c
* Function			dip sw状态输入
* Version	Date		Editor		Modification
* 1.0		2007/05/09	周斌		做成
**********************************************************************/


#include <avr/io.h>
#include "global.h"
#include "sw.h"



/**********************************************************************
* Function Name		sw_init
* Function Desc		sw初始化函数
* Return Value		无
* Parameter         无
* Version	Date		Editor		Modification
* 1.0		2007/05/09	周斌		做成
**********************************************************************/
void sw_init(void)
{
	DDRC &= ~0xff;	//PORT DIRECTION: input
}


/**********************************************************************
* Function Name		sw_stat
* Function Desc		sw状态查询
* Return Value		ir状态, bit0-bit7,on为1,bit0为dip1
* Parameter         无
* Version	Date		Editor		Modification
* 1.0		2007/05/09	周斌		做成
**********************************************************************/
UCHAR sw_stat(void)
{
	UCHAR t_stat;
	t_stat = ~PINC;
	return t_stat;
}



⌨️ 快捷键说明

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