| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- /********************************************************************************
- * File Name: LedTask.h
- * Function Describe: Header file for LedTask.c
- * Explain:
- * Writer: ShiLiangWen
- * Date: 2015-1-30
- *******************************************************************************/
- #ifndef __LEDTEST_H
- #define __LEDTEST_H
- /***********************************************************************************/
- #define WARN_LED1_PIN GPIO_Pin_13 //警示灯1
- #define WARN_LED2_PIN GPIO_Pin_14 //警示灯2
- #define WARN_LED3_PIN GPIO_Pin_15 //警示灯3
- #define WARN_BEEP_PIN GPIO_Pin_0 //蜂鸣器
- #define MODEM_LED4_PIN GPIO_Pin_1
- #define WARN_LED1_PORT GPIOC
- #define WARN_LED2_PORT GPIOC
- #define WARN_LED3_PORT GPIOC
- #define WARN_BEEP_PORT GPIOB
- #define MODEM_LED4_PORT GPIOB
- #define WARN_LED1_HIGH (WARN_LED1_PORT->BSRR = WARN_LED1_PIN)
- #define WARN_LED1_LOW (WARN_LED1_PORT->BRR = WARN_LED1_PIN)
- #define WARN_LED2_HIGH (WARN_LED2_PORT->BSRR = WARN_LED2_PIN)
- #define WARN_LED2_LOW (WARN_LED2_PORT->BRR = WARN_LED2_PIN)
- #define WARN_LED3_HIGH (WARN_LED3_PORT->BSRR = WARN_LED3_PIN)
- #define WARN_LED3_LOW (WARN_LED3_PORT->BRR = WARN_LED3_PIN)
- #define WARN_BEEP_HIGH (WARN_BEEP_PORT->BSRR = WARN_BEEP_PIN)
- #define WARN_BEEP_LOW (WARN_BEEP_PORT->BRR = WARN_BEEP_PIN)
- #define MODEM_LED4_HIGH (MODEM_LED4_PORT->BSRR = MODEM_LED4_PIN)
- #define MODEM_LED4_LOW (MODEM_LED4_PORT->BRR = MODEM_LED4_PIN)
- typedef enum {
- NotBright=0, //不亮
- Bright, //常亮
- Flash, //均衡闪烁
- OneFlashSlow, //每周期闪烁1次,慢周期约9.2S
- TowFlashSlow, //每周期闪烁2次,慢周期约9.2S
- ThreeFlashSlow, //每周期闪烁3次,慢周期约9.2S
- OneFlashFast, //每周期闪烁1次,快周期约3.2S
- TowFlashFast, //每周期闪烁2次,快周期约3.2S
- ThreeFlashFast, //每周期闪烁3次,快周期约3.2S
- }LED_STATUS;
- void LedInit(void);
- void LedProcess(unsigned char reset);
- void SetLedStatus(unsigned char LED,LED_STATUS LedStatus);
- void SetLedIndicator(void);
- #endif
- /***********************************************************************************/
|