hiir.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /******************************************************************************
  2. Copyright (C), 2001-2018, Hisilicon Tech. Co., Ltd.
  3. ******************************************************************************
  4. File Name : hi_api_ddal.h
  5. Version : Initial Draft
  6. Author : Hisilicon multimedia software group
  7. Created : 2007/01/23
  8. Description : Hi_IR.c header file
  9. History :
  10. 1.Date : 2007/01/23
  11. Modification: Created file
  12. ******************************************************************************/
  13. #ifndef __HI_IR_H__
  14. #define __HI_IR_H__
  15. #define OSDRV_MODULE_VERSION_STRING "HISI_IRDA-MF @Hi3518ev200R001"
  16. /* define device name */
  17. #define HIIR_DEVICE_NAME "Hi_IR"
  18. /* Ioctl definitions */
  19. #define IR_IOC_SET_BUF 0x01
  20. #define IR_IOC_SET_ENABLE_KEYUP 0x02// 1:check keyup
  21. #define IR_IOC_SET_ENABLE_REPKEY 0x03// 1:check repkey, 0:hardware behave
  22. #define IR_IOC_SET_REPKEY_TIMEOUTVAL 0x04
  23. #define IR_IOC_SET_FORMAT 0x10
  24. #define IR_IOC_SET_CODELEN 0x11
  25. #define IR_IOC_SET_FREQ 0x12
  26. #define IR_IOC_SET_LEADS 0x13
  27. #define IR_IOC_SET_LEADE 0x14
  28. #define IR_IOC_SET_SLEADE 0x15
  29. #define IR_IOC_SET_CNT0_B 0x16
  30. #define IR_IOC_SET_CNT1_B 0x17
  31. #define IR_IOC_GET_CONFIG 0x20
  32. #define IR_IOC_ENDBG 0x31
  33. #define IR_IOC_DISDBG 0x32
  34. /* device parameter */
  35. typedef struct
  36. {
  37. unsigned short int leads_min;
  38. unsigned short int leads_max;
  39. unsigned short int leade_min;
  40. unsigned short int leade_max;
  41. unsigned short int cnt0_b_min;
  42. unsigned short int cnt0_b_max;
  43. unsigned short int cnt1_b_min;
  44. unsigned short int cnt1_b_max;
  45. unsigned short int sleade_min;
  46. unsigned short int sleade_max;
  47. unsigned short int code_len;
  48. unsigned short int codetype;
  49. unsigned short int frequence;
  50. }hiir_dev_param;
  51. #define HIIR_DEFAULT_FREQ 24//24M
  52. /* DEFINE KEY STATE */
  53. #define HIIR_KEY_DOWN 0x00
  54. #define HIIR_KEY_UP 0x01
  55. typedef struct
  56. {
  57. unsigned long irkey_datah;
  58. unsigned long irkey_datal;
  59. unsigned long irkey_state_code;
  60. }irkey_info_s;
  61. #endif /* End of #ifndef __HI_IR_H__*/