| | |
| | | #include "global_param.h" |
| | | #include "Flash.h" |
| | | #include "dw_app.h" |
| | | #include <string.h> |
| | | |
| | | uint16_t g_com_map[COM_MAP_SIZE]; |
| | | |
| | | |
| | | uint32_t save_com_map_to_flash(void) |
| | | { |
| | |
| | | { |
| | | FLASH_Read(FLASH_IAP_CTRL_MAP, (uint8_t*)&g_com_map, (COM_MAP_SIZE<<1)); |
| | | |
| | | g_com_map[ALARM_DISTANCE] = 200; //榛樿鎶ヨ璺濈200cm |
| | | g_com_map[ALARM_DEV] = 0; |
| | | if(g_com_map[0] != 0x55AA) |
| | | { |
| | | g_com_map[0] = 0x55AA; |
| | | g_com_map[ALARM_DISTANCE1] = 100; //榛樿鎶ヨ璺濈50cm |
| | | g_com_map[ALARM_DISTANCE2] = 600; //榛樿鎶ヨ璺濈50cm |
| | | g_com_map[ALARM_DISTANCE3] = 900; //榛樿鎶ヨ璺濈50cm |
| | | g_com_map[ALARM_DEV] = 1; |
| | | g_com_map[DEV_ID] =4;//DEFAULT_DEV_ID; //榛樿璁惧ID |
| | | g_com_map[COM_INTERVAL]=1000; |
| | | save_com_map_to_flash(); |
| | | } |
| | | |
| | | |
| | | } |
| | | |