2krom写满了,都不知道怎么优化了
This commit is contained in:
+16
-4
@@ -8,13 +8,13 @@
|
||||
#include "gpio.h"
|
||||
#include "button.h"
|
||||
#include "ht1621.h"
|
||||
#include "flash.h"
|
||||
#include "r480r.h"
|
||||
|
||||
#include "eeprom.h"
|
||||
extern ADC_HandleTypeDef hadc;
|
||||
|
||||
struct button key1,key2,key3,key4,overload;
|
||||
|
||||
config_setting config;
|
||||
|
||||
#define set_filtering_times 50
|
||||
struct
|
||||
@@ -264,6 +264,13 @@ void my_code()
|
||||
|
||||
HT1621_Init();
|
||||
r480_init();
|
||||
EPPROM_SLOWWRITE_INIT();
|
||||
|
||||
EEPROM_READ_BATY(16,(char *)&config,sizeof(config_setting));
|
||||
if(config.begin!=0xab)
|
||||
{
|
||||
mode=6;
|
||||
}
|
||||
|
||||
while(1)
|
||||
{
|
||||
@@ -529,7 +536,12 @@ void my_code()
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 6:
|
||||
//stady mode
|
||||
config.begin=0xab;
|
||||
//EEPROM_WRITE_BATY(16,(char *)&config,sizeof(config_setting));
|
||||
//mode=0;
|
||||
break;
|
||||
}
|
||||
|
||||
if(ADCC.adc_value[0]>600||ADCC.adc_value[1]>600)
|
||||
@@ -570,7 +582,7 @@ void my_code()
|
||||
dis_buff.button_flag[2]=0;
|
||||
dis_buff.button_flag[3]=0;
|
||||
|
||||
|
||||
EEPROM_SLOWWRITE_SERVER();
|
||||
HT1621_Display_GetButton();
|
||||
hc2_sever();
|
||||
moto_server();
|
||||
|
||||
Reference in New Issue
Block a user