//
// Created by DELL on 2024/10/16.
//

#ifndef GMV_GATEWAY_BOARD_FFX_MASTER_H
#define GMV_GATEWAY_BOARD_FFX_MASTER_H

#include "main.h"

#define SLAVE_ADDRESS_START 1
#define SLAVE_ADDRESS_END 5

#define POWER_FFX_ADDRESS 0
#define SET_TEMP_FFX_ADDRESS 0x0E
#define FAN_SPEED_FFX_ADDRESS 0x4
#define TEMP_ON_FFX_ADDRESS 0x11
#define TEMP_OFF_FFX_ADDRESS 0x12
#define INNER_NUM_FFX_ADDRESS 0x59

#define POWER_REG_ADDRESS 0
#define WORK_MODE_REG_ADDRESS 1
#define FAN_SPEED_REG_ADDRESS 4
#define SET_TEMP_REG_ADDRESS 14
#define INNER_REG_ADDRESS 88

typedef struct {
    uint8_t power;
    uint8_t mode;
    uint8_t fan_speed;
    uint8_t set_temp;
    uint8_t inner_num;
}ffx_status_t;
/**
 * init ffx master
 */
void ffx_master_init();

#endif //GMV_GATEWAY_BOARD_FFX_MASTER_H
