www.pudn.com > RS485_USART-ok.rar > drv_led.h, change:2007-09-17,size:1491b


//  ---------------------------------------------------------------------------- 
//          Shenzhen ANCHE TECH Co.,LTD 
//  ---------------------------------------------------------------------------- 
//   
//  ---------------------------------------------------------------------------- 
// File Name           : led.h 
// Object              : board led definitions 
// Designer            : Tianlong Jing, at 2006 
// Modification:        :lushijun ,at 2007-08 
//  ---------------------------------------------------------------------------- 
 
#ifndef DRV_LED_H 
#define DRV_LED_H 
 
#include "includes.h" 
 
#if (hardversion == _812DASV10)||(hardversion == _ACDASV10)  
#define BIT_LED0			0x1 << 15  // LED0 = PA15 
#define BIT_LED1			0x1 << 25  // LED1 = PB25 
#define BIT_LED2			0x1 << 30  // LED2 = PB30 
#endif 
 
#if hardversion ==_812DASV11 //不同的板卡LED所处的位置不同,为硬件布线方便 
#define BIT_LED0			0x1 << 4  // LED0 = PA4 
#define BIT_LED1			0x1 << 5  // LED1 = PA5 
#define BIT_LED2			0x1 << 6  // LED2 = PA6 
#define BIT_LED3			0x1 << 7  // LED3 = PA7 
#endif 
 
#if hardversion == _ACDASV11  
#define BIT_LED0			0x1 << 21  // LED0 = PA21 
#define BIT_LED1			0x1 << 22  // LED1 = PA22 
#define BIT_LED2			0x1 << 23  // LED2 = PA23 
#define BIT_LED3			0x1 << 24  // LED3 = PA24 
#endif 
 
#define NUM_LEDS			4 
 
void Led_Init(void); 
void Led_On(unsigned char led); 
void Led_Off(unsigned char led); 
void Led_Toggle(unsigned char led); 
 
#endif /* DRV_LED_H */