ycapic.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. #ifndef YCAPI_H
  2. #define YCAPI_H
  3. //#include "ycapi_global.h"
  4. //#include <QtCore/qglobal.h>
  5. #include <linux/input.h>
  6. #if defined(YCAPI_LIBRARY)
  7. # define YCAPISHARED_EXPORT Q_DECL_EXPORT
  8. #else
  9. # define YCAPISHARED_EXPORT Q_DECL_IMPORT
  10. #endif
  11. #define IO_POLLING_MODE 0
  12. #define IO_INTR_MODE 1
  13. #define IO_INTR_LOW_LEVEL_TRIGGERED 0
  14. #define IO_INTR_HIGH_LEVEL_TRIGGERED 1
  15. #define IO_INTR_FALLING_EDGE_TRIGGERED 2
  16. #define IO_INTR_RISING_EDGE_TRIGGERED 3
  17. #define IO_INTR_BOTH_EDGE_TRIGGERED 4
  18. #define false 0
  19. #define true 1
  20. //YCAPISHARED_EXPORT
  21. int BeepOn(int bStatus);
  22. int SetLed(int bStatus);
  23. int SetWDog(int interval);
  24. int StartWDog();
  25. int FeedWDog();
  26. int StopWDog();
  27. int WriteEEPROM(int addr,char *buf);
  28. int ReadEEPROM(int addr,char *buf);
  29. int SetIO( unsigned char level , unsigned char ioNum);
  30. int SetIoMode(int ioNum,int ioMode ,int triggeredMode);
  31. unsigned char GetIO(unsigned char * level ,unsigned char ioNum);
  32. int GetIoBlockMode( unsigned char * level,unsigned char ioNum);
  33. int UpdateLogo(char * logoPath);
  34. int CopyDir(char * dstDir,char * srcDir);
  35. int TouchBeepCtrl(int flag);
  36. int GetTouchBeep();
  37. void SetBacklightOn(int BakLevel);
  38. int SetBacklightTimeOut(int timeValue);
  39. void SetDefaultBackLightLevel(int level);
  40. int EnableBackLightAuto(int flag);
  41. int GetEnableBackLightAuto();
  42. int GetDefaultBackLightLevel();
  43. int GetBacklightTimeOut();
  44. void SendStartBackligtSignal();
  45. void SendStopBackligtSignal();
  46. int GetStartProgressBarStatus();
  47. int SetStartProgressBarStatus(int bStatus);
  48. int SetNetWork(int num,int isDhcp,char * ip,char * subnetmask,char * gateway,char *dns);
  49. int GetNetWorkCfg(int num,int *isDhcp,char * ip,char * subnetmask,char * gateway,char *dns,char *macAddr);
  50. int SetMacAddr(int num,char * macAddr);
  51. int GetMacAddr(int num,char * macAddr);
  52. int SetAutoStartPath(char * path);
  53. int GetAutoStartPath(char * path);
  54. int RunAutoStartPath();
  55. int ReadTouchEvent();
  56. int GetPassword(char * pwd);
  57. int SetPassword(char * pwd);
  58. int TouchDisable(int flag);
  59. int ReadAdc(int channel,double *data);
  60. void OpenCan(int baudrate);
  61. void WriteCan(int can_id,unsigned char *data,unsigned char dlc);
  62. void ReadCan(unsigned int *can_id,unsigned char *can_dlc,unsigned char *data);
  63. void CloseCan();
  64. int Connect3G() ;
  65. int Disconnect3G();
  66. #endif // YCAPI_H