1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- /********************************************************************************
- * 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_12
- #define MODEM_LED1_PORT GPIOC
- #define MODEM_LED2_PIN GPIO_Pin_2
- #define MODEM_LED2_PORT GPIOD
- #define KEYBOARD_BACKLIGHT_PIN GPIO_Pin_8
- #define KEYBOARD_BACKLIGHT_PORT GPIOB
- #define MODEM_LED1_HIGH (MODEM_LED1_PORT->BRR = MODEM_LED1_PIN) //S
- #define MODEM_LED1_LOW (MODEM_LED1_PORT->BSRR = MODEM_LED1_PIN)
- #define MODEM_LED2_HIGH (MODEM_LED2_PORT->BRR = MODEM_LED2_PIN)
- #define MODEM_LED2_LOW (MODEM_LED2_PORT->BSRR = MODEM_LED2_PIN)
- #define KEYBOARD_BACKLIGHT_HIGH (KEYBOARD_BACKLIGHT_PORT->BSRR = KEYBOARD_BACKLIGHT_PIN)
- #define KEYBOARD_BACKLIGHT_LOW (KEYBOARD_BACKLIGHT_PORT->BRR = KEYBOARD_BACKLIGHT_PIN)
- typedef enum {
- NotBright=0, //均不亮
- RedBright, //红灯常亮
- RedFastFlash, //红灯快闪
- RedSlowFlash, //红灯慢闪
- BlueBright, //蓝灯常亮
- BlueFastFlash, //蓝灯快闪
- BlueSlowFlash, //蓝灯慢闪
- RedBlueBright, //红蓝常亮
- RedBlueFastFlash, //红蓝快闪
- RedBlueSlowFlash //红蓝慢闪
- }LED_STATUS;
- typedef enum{
- IndModemErr=0, //模块错误
- IndNoNet, //无网络 1S 一次搜网中 绿
- InPowerOff, //关机ing 红 常亮
- InStart, //刚开机 常亮
- IndStandby, //待机 //正常5S
- IndRX, //接收
- IndTX, //发送
- InVbatLow //电量低
- }LED_INDICATOR;
- extern unsigned char sucRedLedFlash;
- extern unsigned char sucRedLedSleep;
- extern unsigned char sucBlueLedFlash;
- extern unsigned char sucBlueLedSleep;
- 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);
- void EnterGTProcess();
- #endif
- /***********************************************************************************/
|