1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- #ifndef __LED_H_
- #define __LED_H_
- #define LED_SEL_RED 0
- #define LED_SEL_BLUE 1
- #define MODEM_LED1_PIN GPIO_Pin_6
- #define MODEM_LED1_PORT GPIOB
- #define MODEM_LED2_PIN GPIO_Pin_7
- #define MODEM_LED2_PORT GPIOB
- #define FLASH_LIGHT_PIN GPIO_Pin_8
- #define FLASH_LIGHT_PORT GPIOA
- #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 //发送
- }LED_INDICATOR;
- extern LED_INDICATOR g_LedInd;
- extern unsigned char sucRedLedFlash;
- extern unsigned char sucRedLedSleep;
- void LedInit(void);
- void LedProcess(unsigned char reset);
- void SetLedIndicator(LED_INDICATOR LedInd);
- void SetLedStatus(LED_STATUS LedStatus);
- #endif
|