ffx_master.h 780 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // Created by DELL on 2024/10/16.
  3. //
  4. #ifndef GMV_GATEWAY_BOARD_FFX_MASTER_H
  5. #define GMV_GATEWAY_BOARD_FFX_MASTER_H
  6. #include "main.h"
  7. #define SLAVE_ADDRESS_START 1
  8. #define SLAVE_ADDRESS_END 5
  9. #define POWER_FFX_ADDRESS 0
  10. #define SET_TEMP_FFX_ADDRESS 0x0E
  11. #define FAN_SPEED_FFX_ADDRESS 0x4
  12. #define TEMP_ON_FFX_ADDRESS 0x11
  13. #define TEMP_OFF_FFX_ADDRESS 0x12
  14. #define INNER_NUM_FFX_ADDRESS 0x59
  15. #define POWER_REG_ADDRESS 0
  16. #define WORK_MODE_REG_ADDRESS 1
  17. #define FAN_SPEED_REG_ADDRESS 4
  18. #define SET_TEMP_REG_ADDRESS 14
  19. #define INNER_REG_ADDRESS 88
  20. typedef struct {
  21. uint8_t power;
  22. uint8_t mode;
  23. uint8_t fan_speed;
  24. uint8_t set_temp;
  25. uint8_t inner_num;
  26. }ffx_status_t;
  27. /**
  28. * init ffx master
  29. */
  30. void ffx_master_init();
  31. #endif //GMV_GATEWAY_BOARD_FFX_MASTER_H