| | |
| | | #include "dw_app.h" |
| | | #include <string.h> |
| | | |
| | | uint16_t g_com_map[COM_MAP_SIZE]; |
| | | uint16_t g_com_map[COM_MAP_SIZE],g_com_map2[COM_MAP_SIZE]; |
| | | |
| | | |
| | | uint32_t save_com_map_to_flash(void) |
| | |
| | | g_com_map[MODBUS_MODE]=0; |
| | | g_com_map[POWER]=67; |
| | | g_com_map[FILTER_COEFFICIENT]=40; |
| | | g_com_map[SPEEDFILTER_THRES]=15000; |
| | | save_com_map_to_flash(); |
| | | g_com_map[SPEEDFILTER_THRES]=10000; |
| | | } |
| | | void parameter_init(void) |
| | | { |
| | | FLASH_Read(FLASH_IAP_CTRL_MAP, (uint8_t*)&g_com_map, (COM_MAP_SIZE<<1)); |
| | | |
| | | // if(g_com_map[0] != 0x55AA) |
| | | // { |
| | | |
| | | // } |
| | | if(g_com_map[0] != 0x55AA) |
| | | { |
| | | returnfactory_parameter(); |
| | | } |
| | | } |
| | | |