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

#ifndef GMV_GATEWAY_BOARD_CONTANTS_IS_THREE_H
#define GMV_GATEWAY_BOARD_CONTANTS_IS_THREE_H

#include "main.h"

#define SLAVE_ADDRESS_START_2 7       // 从机地址起始
#define SLAVE_ADDRESS_END_2 10         // 从机地址结束
#define SLAVE_ADDRESS_END_3 20         // 从机地址结束

#define THREE_CONSTANTS_POWER_REG_ADDRESS 1     // 新风机电源地址
#define THREE_CONSTANTS_MODE_REG_ADDRESS 2     // 新风机工作模式
#define THREE_CONSTANTS_FAN_SPEED_REG_ADDRESS 3     // 风机档位
#define THREE_CONSTANTS_HUMP_ON_REG_ADDRESS 17     // 加湿低位
#define THREE_CONSTANTS_HUMP_OFF_REG_ADDRESS 18     // 加湿高位
#define THREE_CONSTANTS_ERRORS_REG_ADDRESS 32     // 新风加湿机故障码
#define DRY_ERRORS_REG_ADDRESS 0x07     // 新风加湿机故障码
#define DRY_POWER_REG_ADDRESS 0x14     // 除湿机电源地址

typedef struct
{
    uint8_t power;
    uint8_t mode;
    uint8_t fresh_air_system;
    uint8_t fan_speed;
    uint8_t set_temp;
    uint8_t inner_num;
    uint8_t humidity_on;
    uint8_t humidity_off;
} ffx_status_t2;

/**
 * init ffx master
 */
void constants_is_three_master_init();

#endif //GMV_GATEWAY_BOARD_FFX_MASTER_H
