39 lines
766 B
C
39 lines
766 B
C
#ifndef _SYSCONFIG_H
|
|
#define _SYSCONFIG_H
|
|
#include "stdint.h"
|
|
#include "at32a423.h"
|
|
#include "bsp_flash.h"
|
|
#include "app_get_json.h"
|
|
#include "string.h"
|
|
|
|
typedef struct
|
|
{
|
|
uint16_t output_mode;
|
|
uint16_t output_ax;
|
|
uint16_t output_ay;
|
|
uint16_t min_trigger_res_value;
|
|
uint16_t max_trigger_res_value;
|
|
uint16_t div_trigger_res;
|
|
}sys_config_struct;
|
|
|
|
typedef struct
|
|
{
|
|
uint8_t lying_staus;
|
|
int row;
|
|
int col;
|
|
}sys_staus_struct;
|
|
|
|
extern sys_config_struct g_sys_config;
|
|
extern sys_staus_struct g_sys_staus;
|
|
extern flash_para_struct g_flash_para;
|
|
extern const sys_config_struct default_config;
|
|
|
|
void init_sys_config(sys_config_struct *sys_config);
|
|
int save_sys_config(sys_config_struct *sys_config);
|
|
int cjson_get_sys_config(sys_config_struct *sys_config);
|
|
|
|
|
|
|
|
#endif
|
|
|