123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- /********************************************************************************
- * 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 LED1_PIN GPIO_Pin_13
- #define LED2_PIN GPIO_Pin_8
- #define LED3_PIN GPIO_Pin_9
- #define LED4_PIN GPIO_Pin_14
- #define MODEM_LED1_PORT GPIOC
- #define MODEM_LED2_PORT GPIOB
- #define MODEM_LED3_PORT GPIOB
- #define MODEM_LED4_PORT GPIOC
- #define MODEM_LED1_HIGH (MODEM_LED1_PORT->BSRR = LED1_PIN)
- #define MODEM_LED1_LOW (MODEM_LED1_PORT->BRR = LED1_PIN)
- #define MODEM_LED2_HIGH (MODEM_LED2_PORT->BSRR = LED2_PIN)
- #define MODEM_LED2_LOW (MODEM_LED2_PORT->BRR = LED2_PIN)
- #define MODEM_LED3_HIGH (MODEM_LED3_PORT->BSRR = LED3_PIN)
- #define MODEM_LED3_LOW (MODEM_LED3_PORT->BRR = LED3_PIN)
- #define MODEM_LED4_HIGH (MODEM_LED4_PORT->BSRR = LED4_PIN)
- #define MODEM_LED4_LOW (MODEM_LED4_PORT->BRR = 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
- /***********************************************************************************/
|