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

📄 led.c

📁 瑞萨(Renesas)M16C系列芯片的函数库
💻 C
字号:
#include "LED.h"	// LED utility header#include "sfr62p.h"	// SFR definition of M16C/62P/*""FUNC COMMENT""************************************************************** ID         		: ---* Function name     : void InitLED(void)* Function     		: initialize light-emitted diode* Paramenter   		: none* Return 	 		: none* Function used		: none* Notice	   		: none* History    		: ---*""FUNC COMMENT END""*********************************************************/void InitLED(void){	pd5 = pd5 & 0xE1; // P5_1 to P5_5 is used as input	pd2 = 0xFF;	//P2 is used as output	p2 = 0xFF;	//all LED not light}/*""FUNC COMMENT""************************************************************** ID         		: ---* Function name     : void SetLED(unsigned char)* Function     		: light diode with parameter* Paramenter   		: none* Return 	 		: none* Function used		: none* Notice	   		: none* History    		: ---*""FUNC COMMENT END""*********************************************************/void SetLED(unsigned char value){	value = ~value;	// because the circuit, the parameter should be reversed	p2 = value;		// set the result to Port P2}

⌨️ 快捷键说明

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