📄 mcled.h
字号:
#ifndef MCLED_H#define MCLED_H#include <termios.h>#include <pthread.h>#define DELAY 60000 #define RTC_MODE 0#define STA_MODE 1#define AP_DVD 0#define AP_VCD 1#define AP_CD 2#define AP_MP3 3#define AP_FM 4#define AP_TV 5#define AP_PHOTO 6#define ST_PLAY 0#define ST_STOP 1#define ST_PAUSE 2#define ST_FF 3#define ST_FB 4#define ST_NC 5#define ST_PC 6#define RE_NORMAL 0#define RE_ALL 1#define RE_ONE 2#define RE_A 3#define RE_AB 4#define RE_SH 5class MCLed { public: MCLed(); ~MCLed(); bool Open(); bool Clear(); bool ShowAp(int ap); bool HideAp(int ap); bool ShowStringLeft(char *data,int n); bool ShowStringRight(char *data,int n); bool ShowString(char *data,int begin,int length); bool ShowPlay(); bool HidePlay(); bool ShowStop(); bool HideStop(); bool ShowPause(); bool HidePause(); bool ShowFF(); bool HideFF(); bool ShowFB(); bool HideFB(); bool ShowNC(); bool HideNC(); bool ShowPC(); bool HidePC(); bool ShowAC3(); bool HideAC3(); bool ShowDTS(); bool HideDTS(); bool ShowTime(int hour,int min,int sec); bool HideTime(int mode); bool ShowTrack(int current); bool HideTrack(); bool ShowTitle(int current); bool HideTitle(); bool ShowChapter(int current); bool HideChapter(); bool ShowName(char *name); bool ShowRepeatMode(int mode); bool HideRepeatMode(int mode); bool ShowTimeOffStatus(bool status); bool ShowFavoriteNo(int no); bool ShowFrequence(int fre); bool HideFrequence(); bool ShutDownLED(); bool SetMode(unsigned char mode); bool SetPCMode(); bool ShowSPDIF(bool flag); bool CleanSPDIF(); void Log(char *text); private: int fd; FILE *fp; int ShowHour,ShowMin,ShowSec; bool FirstShowTime; struct termios term; pthread_mutex_t lock; bool ShowIcon(unsigned char len,unsigned char section,unsigned char *data); bool HideIcon(unsigned char len,unsigned char section,unsigned char *data); bool ShowAscii(unsigned char section,char data); bool ShowPlayStatus(int status); bool HidePlayStatus(int status); bool Usleep(int msec);};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -