QNAP-TS419p system daemon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.8 KiB

  1. #ifndef _PIC_H_
  2. #define _PIC_H_
  3. struct picdev; /* private data */
  4. struct picdev * pic_open(const char *devicename, struct lcddev *lcd);
  5. void pic_close(struct picdev *dev);
  6. #define PIC_CMD_FANSPEED_0 0x30
  7. #define PIC_CMD_FANSPEED_1 0x31
  8. #define PIC_CMD_FANSPEED_2 0x32
  9. #define PIC_CMD_FANSPEED_3 0x33
  10. #define PIC_CMD_FANSPEED_4 0x34
  11. #define PIC_CMD_FANSPEED_5 0x35
  12. #define PIC_CMD_POWER_OFF 0x41
  13. #define PIC_CMD_AUTOPOWER_ON 0x48
  14. #define PIC_CMD_AUTOPOWER_OFF 0x49
  15. #define PIC_EVENT_POWER_BUTTON 0x40
  16. #define PIC_CMD_POWERLED_OFF 0x4B
  17. #define PIC_CMD_POWERLED_2HZ 0x4C
  18. #define PIC_CMD_POWERLED_ON 0x4D
  19. #define PIC_CMD_POWERLED_1HZ 0x4E
  20. #define PIC_CMD_BUZZ_SHORT 0x50
  21. #define PIC_CMD_BUZZ_LONG 0x51
  22. #define PIC_CMD_STATUSLED_RED_2HZ 0x54
  23. #define PIC_CMD_STATUSLED_GREEN_2HZ 0x55
  24. #define PIC_CMD_STATUSLED_GREENON 0x56
  25. #define PIC_CMD_STATUSLED_REDON 0x57
  26. #define PIC_CMD_STATUSLED_REDGREEN_2HZ 0x58
  27. #define PIC_CMD_STATUSLED_OFF 0x59
  28. #define PIC_CMD_STATUSLED_GREEN_1HZ 0x5A
  29. #define PIC_CMD_STATUSLED_RED_1HZ 0x5B
  30. #define PIC_CMD_STATUSLED_REDGREEN_1HZ 0x5C
  31. #define PIC_CMD_USBLED_ON 0x60
  32. #define PIC_CMD_USBLED_8HZ 0x61
  33. #define PIC_CMD_USBLED_OFF 0x62
  34. #define PIC_EVENT_FAN1_ERR 0x73
  35. #define PIC_EVENT_FAN1_OK 0x74
  36. #define PIC_EVENT_FAN2_ERR 0x75
  37. #define PIC_EVENT_FAN2_OK 0x76
  38. #define PIC_EVENT_FAN3_ERR 0x77
  39. #define PIC_EVENT_FAN3_OK 0x78
  40. #define PIC_EVENT_FAN4_ERR 0x79
  41. #define PIC_EVENT_FAN4_OK 0x7A
  42. #define PIC_EVENT_TEMP_RANGE_MIN 0x80 /* 0°C */
  43. #define PIC_EVENT_TEMP_RANGE_MAX 0xC6 /* 70°C */
  44. #define PIC_EVENT_TEMP_WARN 0x38 /* 71-79°C */
  45. #define PIC_EVENT_TEMP_CRIT 0x39 /* >= 80°C */
  46. int pic_set_fanspeed(struct picdev *dev, char value);
  47. int pic_set_buzzer(struct picdev *dev, char value);
  48. int pic_set_status_led(struct picdev *dev, char value);
  49. int pic_set_usb_led(struct picdev *dev, char value);
  50. #endif /* _PIC_H_ */