| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- /********************************************************************************
- * File Name: LedTask.h
- * Function Describe: Header file for LedTask.c
- * Explain:
- * Writer: ShiLiangWen
- * Date: 2015-1-30
- *******************************************************************************/
- #ifndef __LEDTEST_H
- #define __LEDTEST_H
- /***********************************************************************************/
- #include <rtl.h>
- extern OS_TID idLedTask;
- #define LED_SEL_RED 0
- #define LED_SEL_BLUE 1
- #define MODEM_LED1_PIN GPIO_Pin_4
- #define MODEM_LED2_PIN GPIO_Pin_6
- #define MODEM_LED1_PORT GPIOB
- #define MODEM_LED2_PORT GPIOB
- #define MODEM_LED1_HIGH (MODEM_LED1_PORT->BSRR = MODEM_LED1_PIN)
- #define MODEM_LED1_LOW (MODEM_LED1_PORT->BRR = MODEM_LED1_PIN)
- #define MODEM_LED2_HIGH (MODEM_LED2_PORT->BSRR = MODEM_LED2_PIN)
- #define MODEM_LED2_LOW (MODEM_LED2_PORT->BRR = MODEM_LED2_PIN)
- typedef enum {
- NotBright=0, //均不亮
- RedBright, //红灯常亮
- RedFastFlash, //红灯快闪
- RedSlowFlash, //红灯慢闪
- BlueBright, //蓝灯常亮
- BlueFastFlash, //蓝灯快闪
- BlueSlowFlash, //蓝灯慢闪
- RedBlueBright, //红蓝常亮
- RedBlueFastFlash, //红蓝快闪
- RedBlueSlowFlash //红蓝慢闪
- }LED_STATUS;
- typedef enum{
- IndModemErr=0, //模块错误
- IndNoNet, //无网络
- IndStandby, //待机
- IndRX, //接收
- IndTX, //发送
- IndReboot //提示重启
- }LED_INDICATOR;
- void SetLedStatus(LED_STATUS LedStatus);
- extern LED_INDICATOR g_LedInd;
- void SetLedIndicator(LED_INDICATOR);
- void LedInit(void);
- __task void LedTask(void);
- void LedProcess(unsigned char reset);
- #endif
- /***********************************************************************************/
|