fix(vd960DBN): 修复无法设置 IoT 模式的 bug
This commit is contained in:
@@ -303,6 +303,8 @@ void load_cfg_from_flash(void)
|
||||
g_sub_code_enable.wbdus_enable = (g_sub_code_enable.code_set >> 5) & 0x01;
|
||||
g_sub_code_enable.radar_enable = (g_sub_code_enable.code_set >> 6) & 0x01;
|
||||
|
||||
PRINT("\nSub_Code: 0x%04X, net_enable:%d, iot_enable:%d\n", g_sub_code_enable.code_set, g_sub_code_enable.net_enable, g_sub_code_enable.iot_enable);
|
||||
|
||||
// g_sub_code_enable.laser_enable = (g_sub_code_enable.code_set >> 9) & 0x01;
|
||||
// g_sub_code_enable.lora_enable = (g_sub_code_enable.code_set >> 15) & 0x01;
|
||||
|
||||
@@ -314,6 +316,7 @@ void output_cfg_from_flash(void)
|
||||
// if(g_flag_debug)
|
||||
// {
|
||||
PRINT("\nBaud1:%d, Baud2:%d\n", g_storage_uart_baud, g_storage_uart_baud_2);
|
||||
PRINT("\nSub_Code:0x%04X\n", g_sub_code_enable.code_set);
|
||||
PRINT("\nGet Net config:\n");
|
||||
PRINT("Local Net Config: "
|
||||
" mac:%02X-%02X-%02X-%02X-%02X-%02X\n"
|
||||
@@ -368,7 +371,6 @@ void update_sub_code_enable(void)
|
||||
if(mBuff == NULL)
|
||||
{
|
||||
PRINT("Err_When_malloc__\n");
|
||||
free(mBuff);
|
||||
return;
|
||||
}
|
||||
memset(mBuff, 0, CFG_FLASH_BLOCK_SIZE);
|
||||
@@ -381,6 +383,7 @@ void update_sub_code_enable(void)
|
||||
SPI_Flash_Write(mBuff, DEV_CNG_ADDR_BASE, CFG_FLASH_BLOCK_SIZE);
|
||||
|
||||
free(mBuff);
|
||||
Delay_Ms(50);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user