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

📄 ioport.h

📁 实现120无传感器变频输出
💻 H
字号:
/***********************************************************************/
/*                                                                     */
/*  FILE        :ioport.h                                        */
/*  DATE        :Tue, Jun 07, 2005                                     */
/*  DESCRIPTION :I/O port                                          */
/*  CPU TYPE    :Other                                                 */
/*                                                                     */
/*  This file is coded by RSBJ WRD     */
/*                                                                     */
/***********************************************************************/
#include "sfr26a.h"
#include "typedefine.h"

#ifndef IOPORT
#define IOPORT
void ioport_ini (void);

#define PTC_OP(val)	 p9_1 = val //,prc2 = 1, pd9_0 = 1, prc2 = 0
#define FAN_OP(val)	 p9_0 = val //prc2 = 1, pd9_1 = 1, prc2 = 0
#define VAL_OP(val)	 p9_2 = val //prc2 = 1, , pd9_2 = 1, prc2 = 0

#define LEDV604_OP(val)		 p8_2 = val,pd8_2 = 1
#define LEDV605_OP(val)		 p8_3 = val,pd8_3 = 1

#define LED604	p8_2
#define LED605 	p8_3
#define LED604DIR 	pd8_2
#define LED605DIR	pd8_3
#define NMLPERIOD	(10)
#define ERRPERIOD	(5)
#define TIMEBASETEST	p7_6 = ~p7_6, pd7_6 = 1
#define TIMEBASETEST1	p7_7 = ~p7_7, pd7_7 = 1


void P90_out(void);

void LEDV605_flash ( const UINT_8 period ,const UINT_8 flashsw );
void LEDV604_flash ( const UINT_8 period ,const UINT_8 flashsw,const UINT_8 flashtimes );

#define LEDGREENOP(val)	LEDV605_OP(val)
#define LEDREDOP(val)	LEDV604_OP(val)

#define LEDGREENFLASH()	LEDV605_flash (NMLPERIOD,1)
#define LEDREDFLASH()	LEDV604_flash ( ERRPERIOD,1,error_code )

void ledgreenrun (void);
void ledredrun (void);

#endif

⌨️ 快捷键说明

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