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

📄 led.h

📁 uboot底层驱动
💻 H
字号:
/*************************************************************************************
*	Copyright (c) 2005 by National ASIC System Engineering Research Center.
*	PROPRIETARY RIGHTS of ASIC are involved in the subject matter of this 
*	material.  All manufacturing, reproduction, use, and sales rights 
*	pertaining to this subject matter are governed by the license agreement.
*	The recipient of this software implicitly accepts the terms of the license.
*
*	File Name: led.h
*
*	File Description:
*			The file define some macro definition used in nand.c file.
*		
*	Created by Wuer
**************************************************************************************/

#ifndef LED_H
#define LED_H

#include "def.h"
#include "hardware_reg.h"

/*several macros of nand registers*/
#define dot			0x1						// ????ò???ó?μ?μ?è¨?μ
#define sect1 		(0x1<<1)
#define sect2 		(0x1<<2)
#define sect3 		(0x1<<3)
#define sect4 		(0x1<<4)
#define sect5 		(0x1<<5)
#define sect6 		(0x1<<6)
#define sect7 		(0x1<<7)


#define	charA		(sect1 + sect2 + sect3 + sect5 + sect6 + sect7)			<< 8
#define	charb		(sect1 + sect2 + sect3 + sect4 + sect5)             << 8
#define	charC		(sect2 + sect3 + sect4 + sect7)                     << 8
#define	chard		(sect5 + sect6 + sect1 + sect3 + sect4)             << 8
#define	charE		(sect7 + sect2 + sect1 + sect3 + sect4)             << 8
#define	charF		(sect7 + sect1 + sect3 + sect2)                     << 8
#define	charg	    (sect1+sect2+sect6+sect7+sect5+sect4)   <<8
#define charH		(sect1 + sect2 + sect3 + sect5 + sect6)             << 8
#define	charh		(sect2 + sect1 + sect3 + sect5)                     << 8
#define charI		(sect2 + sect3)										<< 8
#define	charJ		(sect5 + sect6 + sect4)                             << 8
#define	charL		(sect2 + sect3 + sect4)                             << 8
#define	charn		(sect7 + sect6 + sect2 + sect3 + sect5)             << 8
#define charp		(sect7 + sect6 + sect1 + sect3 + sect2)             << 8
#define charq		(sect7 + sect6 + sect1 + sect5 + sect2)             << 8
#define	charr		(sect7 + sect2 + sect3)                             << 8
#define	charS		(sect7 + sect2 + sect1 + sect4 + sect5)             << 8
#define	chart		(sect2 + sect1 + sect3 + sect4)                     << 8
#define	charU		(sect2 + sect3 + sect4 + sect5 + sect6)             << 8
#define	chary		(sect6 + sect2 + sect1 + sect5 + sect4)             << 8
#define charAdot	((charA) + 0x0100 )                                  
#define	charbdot	((charb) + 0x0100 )                                     
#define	charCdot	((charC) + 0x0100 )
#define	charddot	((chard) + 0x0100 ) 
#define	charEdot	((charE) + 0x0100 ) 
#define	charFdot	((charF) + 0x0100 )
#define	chargdot	((charg) + 0x0100 )
#define	charHdot	((charH) + 0x0100 ) 
#define	charhdot	((charh) + 0x0100 )
#define	charIdot	((charI) + 0x0100 )
#define	charJdot	((charJ) + 0x0100 )
#define	charLdot	((charL) + 0x0100 )
#define	charndot	((charn) + 0x0100 )
#define	charpdot	((charp) + 0x0100 )
#define	charqdot	((charq) + 0x0100 )
#define	charrdot	((charr) + 0x0100 )
                                    
#define	charUdot	((charU) + 0x0100 )                                     
                                     
                                     
                                      
#define	chartdot	((chart) + 0x0100 )                                     
#define	charhdot	((charh) + 0x0100 )                                      
#define	charydot	((chary) + 0x0100 )                                     
#define	charLdot	((charL) + 0x0100 )                                      


/* LED operation functions*/
int	ModuleLed(void);
void LedDisPlay(U8 data[]);
void Led_Init(void);
void LedOut(U16 data[], U32 times);
void sLedout(U16 data, unsigned char Bit_i);
void LedUpdate(void);
void delayl(int cycle);

extern U16 Num[10];
extern U16 LedNum[10];
extern U16 Numdot[10];

#endif

⌨️ 快捷键说明

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