
#include "base/delay.h"
#include "base/utility.h"
#include "hardware/adc_cfg.h"
#include "hardware/dac_cfg.h"
#include "hardware/gpio_cfg.h"
#include "hardware/jw3425iic.h"
#include "hardware/power.h"
#include "hardware/timer_cfg.h"
#include "driver/EWDriver.h"
#include "driver/JQDriver.h"
#include "driver/XTDriver.h"
#include "interface/BaseChecker.h"
#include "interface/JQChecker.h"
#include "interface/XTChecker.h"
#include "interface/EWChecker.h"

#include "elec_det.h"
#include "dev_flash.h"
#include "mystring.h"
#include "elec_io.h"

// 此文件实现elec模块的输入输出接口



int ConsoleUsart_send_bytes(uint8_t *d,int len)
{
  return 0;
}


int SaveBoardInfo(void)
{
  sys_param_def *spar=0;
  spar=calloc(1,sizeof(sys_param_def));
  memcpy(spar,sys_param(),sizeof(sys_param_def));
  spar->hard_version=boardinfo_un.boardinfo.hard_v;
  spar->resistor_diff=boardinfo_un.boardinfo.resistor_diff;
  flash_save_param(spar);
  free(spar);
  return 0;
}


int LoadBoardInfo(void)
{
  boardinfo_un.boardinfo.bootflag=1;
  boardinfo_un.boardinfo.hard_v=sys_param()->hard_version;
  boardinfo_un.boardinfo.resistor_diff=sys_param()->resistor_diff;
  return 0;
}



void Ye_RunPlanCheckTest(void)
{
  array_def *data=arr_creat();
  array_def *r=elec_check_with_scheme(data);
  arr_delete(data);
}











