📄 halrunled.h
字号:
/****************************************************************
* Viaon Technology (Suzhou) Co.,Ltd
*
* Copyright 2007, Viaon Technology (Suzhou) Co.,Ltd,Suzhou,China
* All rights reserved.
*
*
* Filename: halrunled.h
*
* Programmer: Greg
*
* Created: 1/2/2008
*
* Description: public functions
*
*
* Change History (most recent first): 2008.1.2
****************************************************************/
#ifndef _RUN_LED_
#define _RUN_LED_
#include "utiltypedef.h"
#include "va4010reg.h"
#include "config.h"
#if(BOARD_ID == EVB_V1)
//led pin direction set
#define LED_PIN_INIT() (P1_DDR |= 0x10)
//for usb status
#define RUN_LED_ON_USB 0x10//p1^4
#define SET_RUN_LED_USB() (P1|=RUN_LED_ON_USB) //The pin direction must be set before this
#define CLR_RUN_LED_USB() (P1&=(~RUN_LED_ON_USB))
#define CHK_RUN_LED_USB() (P1&RUN_LED_ON_USB)
//for sd status
#define RUN_LED_ON_SD 0x20//p1^5
#define SET_RUN_LED_SD() (P1|=RUN_LED_ON_SD) //The pin direction must be set before this
#define CLR_RUN_LED_SD() (P1&=(~RUN_LED_ON_SD))
#define CHK_RUN_LED_SD() (P1&RUN_LED_ON_SD)
#elif(BOARD_ID == HZ_111 )
//led pin direction set
#define LED_PIN_INIT() (P2_DDR |= 0x10)
//for usb status
#define RUN_LED_ON_USB 0x10//p2^4
#define SET_RUN_LED_USB() (P2|=RUN_LED_ON_USB) //The pin direction must be set before this
#define CLR_RUN_LED_USB() (P2&=(~RUN_LED_ON_USB))
#define CHK_RUN_LED_USB() (P2&RUN_LED_ON_USB)
//for sd status
#define RUN_LED_ON_SD 0x02//p2^1
#define SET_RUN_LED_SD() (P2|=RUN_LED_ON_SD) //The pin direction must be set before this
#define CLR_RUN_LED_SD() (P2&=(~RUN_LED_ON_SD))
#define CHK_RUN_LED_SD() (P2&RUN_LED_ON_SD)
#endif
#ifdef ENABLE_RUN_LED
void halRunLED(void);
void halLEDInit(void);
#else
#define halRunLED(x)
#define halLEDInit()
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -