#ifndef APP_PARAMETER_H_
#define APP_PARAMETER_H_

#include "flash.h"
#include "upUartParse.h"


#pragma pack(push, 1)

typedef struct _configInfo {
    uint32_t upWard_Uart_Baud;  //与网关通信波特率
    uint32_t J1_485_Baud;       //与J1_485通信波特率
    uint32_t J2_485_Baud;       //与J2_485通信波特率
    uint32_t J3_485_Baud;       //与J3_485通信波特率
    uint32_t J4_485_Baud;       //与J4_485通信波特率
    uint32_t J5_0_485_Baud;     //与J5_0_485通信波特率

    uint16_t crc;               //crc校验
} configInfo;

#pragma pack(pop)

void readConfigParameter(void);
void writeConfigParameter(configInfo inConfigInfo);

float getWorkCurrent(void);
void setWorkCurrent(float Curr);
float getWorkVoltage(void);
void setWorkVoltage(float Voltage);
float getTemperature(void);
void setTemperature(float Temperature);
uint32_t getUpWard_Uart_Baud(void);
uint32_t getJ1_485_Baud(void);
uint32_t getJ2_485_Baud(void);
uint32_t getJ3_485_Baud(void);
uint32_t getJ4_485_Baud(void);
uint32_t getJ5_0_485_Baud(void);



#endif