1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- #ifndef __BOARD_H_
- #define __BOARD_H_
- #include "stdbool.h"
- #include "lsapi_os.h"
- #define MAX_SPK_VOL 9
- #define KEY_TIMER_TICK 30
- #define KS_ALL_IDLE 0
- //组合键值,用于底层处理使用
- typedef enum{
- MKEY_VALUE_0=0,
- MKEY_VALUE_1=1,
- MKEY_VALUE_2=2,
- MKEY_VALUE_3=3,
- MKEY_VALUE_4=4,
- MKEY_VALUE_5=5,
- MKEY_VALUE_6=6,
- MKEY_VALUE_7=7,
- MKEY_VALUE_8=8, //加制将MIC_PTT放进来,放到最后吧
- MKEY_VALUE_13=13, //加制将MIC_PTT放进来,放到最后吧
- MKEY_VALUE_NONE=15//不使用
- }MKEY_VALUEENUM;
- typedef enum{
- ENCODE_IDLE,
- ENCODE_SHUN=1,
- ENCODE_NI=2
- }ENCODE_DIRECTION;
- #define MKEY_VALUE_PTT (1<<MKEY_VALUE_3)
- #define MKEY_VALUE_F1 (1<<MKEY_VALUE_6)
- #define MKEY_VALUE_F2 (1<<MKEY_VALUE_5)
- #define MKEY_VALUE_MENU (1<<MKEY_VALUE_2) //短按确认,长按锁屏
- #define MKEY_VALUE_UP (1<<MKEY_VALUE_4)
- #define MKEY_VALUE_DOWN (1<<MKEY_VALUE_13) //菜单键/下一项键
- #define MKEY_VALUE_ESC (1<<MKEY_VALUE_0)
- #define MKEY_VALUE_CB_GT (MKEY_VALUE_MENU | MKEY_VALUE_ESC)
- #define MKEY_VALUE_CB_IP (MKEY_VALUE_ESC | MKEY_VALUE_DOWN)
- #define MKEY_VALUE_MIC_PTT (1<<MKEY_VALUE_8)
- #define MKEY_VALUE_CB_PTT (MKEY_VALUE_PTT|MKEY_VALUE_MIC_PTT)
- #define CTL_LCD_BL(bit) lcdBackList(bit) ////
- #define CTL_POWER_HOLD(bit) pwrHoldCtl(bit)//暂时无控制,当前电池直接驱动了
- #define TONE_NORMAL 880
- #define TONE_SPECIAL 880
- void redLedCtl(bool onoff);
- void greenLedCtl(bool onoff);
- void spkCtl(bool onoff);
- void lcdBackList(char onoff);
- void pwrHoldCtl(bool onoff);
- void msgAtSend(char *at);
- void msgAtSends(char *at ,int len);
- void boardInit(void);
- void usbOutPut(unsigned char *info, int len);
- unsigned int getAppTick(void);
- void keySendEvent(unsigned short key, unsigned char keyType);
- void encodeSendEvent(unsigned short encode);
- void stopKeyTimer(void);
- void paControl(bool status);
- unsigned short getKeyValue();
- unsigned short SetZeroKeyValue();
- void startBackLightTimer(int time);
- void pttBeepStart(bool isMicReq);
- void beepStart(int freq);
- void VibCtrl(bool statue);
- void VibStart(char time);
- //extern LSAPI_OSI_Timer_t *BleTimer_t;
- #endif
|