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

📄 dispdled.h

📁 威望公司MP3 + USB MCU 的参考软件
💻 H
字号:
#ifndef _DISP_DLED_
#define _DISP_DLED_

#include "va4010reg.h"
#include "common.h"
#include "display.h"

#define LED_0		0xC0//0x3F
#define LED_1		0xF9//0x06
#define LED_2		0xA4//0x5B
#define LED_3		0xB0//0x4F
#define LED_4		0x99//0x66
#define LED_5		0x92//0x6D
#define LED_6		0x82//0x7D
#define LED_7		0xF8//0x07
#define LED_8		0x80//0x7F
#define LED_9		0x90//0x6F
#define LED_DOT		0x7F//0x80
#define LED_E		0x86//"E"
#define LED_R		0xAF//"r"
#define LED_NONE	0xFF
#define LED__		0xF7//"_"
#define ADD_DOT(X) (X &= LED_DOT)

#if(BOARD_ID == EVB_V1)
#if 0//for test FM module ,set  p1.0,p1.1,p1.2  for FM pin instead of DLED
#define DLED_DATA_DIROUT()	
#define DLED_DATA(x)		
#define DLED_DATA_OFF()		
#define DLED_DATA_GET()		
#define DLED_DATA_SET(x)	

#define DLED_SEG_DIROUT()	
#define DLED_SEG_SEL(x)		
#define DLED_SEG_OFF()		
#define DLED_SEG_GET()		
#define DLED_SEG_SET(x)		
#else
#define DLED_DATA_DIROUT()	(P1_DDR=0xFF)
#define DLED_DATA(x)		(P1 = x)
#define DLED_DATA_OFF()		(P1 = 0xFF)
#define DLED_DATA_GET()		(P1)
#define DLED_DATA_SET(x)	(P1=x)

#define DLED_SEG_DIROUT()	(P3_DDR |= 0xF0)
#define DLED_SEG_SEL(x)		(P3 |= (0x10 << x))
#define DLED_SEG_OFF()		(P3 &= 0x0F)
#define DLED_SEG_GET()		(P3&0XF0)
#define DLED_SEG_SET(x)		(P3|=x)
#endif

#elif (BOARD_ID == WITLINK_070)
#define DLED_DATA_DIROUT()	(P0_DDR=0xFF)
#define DLED_DATA(x)		(P0 = x)
#define DLED_DATA_OFF()		(P0 = 0xFF)
#define DLED_DATA_GET()		(P0)
#define DLED_DATA_SET(x)		(P0=x)

#define DLED_SEG_DIROUT()	(P4_DDR |= 0xF0)
#define DLED_SEG_SEL(x)		(P4 |= (0x10 << x))
#define DLED_SEG_OFF()		(P4 &= 0x0F)
#define DLED_SEG_GET()		(P4&0XF0)
#define DLED_SEG_SET(x)		(P4|=x)

#endif


#if (DIGITAL_SHOW == DIGITAL_SHOW_DLED)
void DispFSM(void);
void DispInit(void);
void DispSetStatus(BYTE bStatus);
void DispReset(void);
void halDLEDISR(void);

#else
#define DispFSM();
#define DispInit();
#define DispSetStatus(bStatus);
#define DispReset();
#define halDLEDISR();
#endif

#endif




⌨️ 快捷键说明

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