update 解决相关bug
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "app_leakage.h"
|
||||
#include "bsp_W5500.h"
|
||||
|
||||
/* spi flash Ƭѡ<C6AC><D1A1><EFBFBD><EFBFBD> - pb12 */
|
||||
#define W25Q32_CS_LOW() HAL_GPIO_WritePin(SPI2_CS_GPIO_Port, SPI2_CS_Pin, GPIO_PIN_RESET)
|
||||
@@ -95,12 +96,27 @@ static void gui_tjc_hmi_read_device_info_from_w25q(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void gui_tjc_hmi_read_network_config_from_w25q(void)
|
||||
{
|
||||
network_config_t config;
|
||||
w25q32.read(W25Q32_NETWORK_CONFIG_ADDR, (uint8_t*)&config, sizeof(config));
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ч<EFBFBD>ԣ<EFBFBD><D4A3>жϵ<D0B6>һ<EFBFBD><D2BB>IP<49>ֽڲ<D6BD><DAB2><EFBFBD>0xFF<46><46><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>Ч<EFBFBD><D0A7><EFBFBD>ݣ<EFBFBD> */
|
||||
if (config.ip[0] != 0xFF && config.ip[0] != 0x00) {
|
||||
memcpy(W5500.IP_Addr, config.ip, 4);
|
||||
memcpy(W5500.Sub_Mask, config.mask, 4);
|
||||
memcpy(W5500.Gateway_IP, config.gateway, 4);
|
||||
W5500.W5500_Class[0].ConfigData.Port[0] = (config.port >> 8) & 0xFF;
|
||||
W5500.W5500_Class[0].ConfigData.Port[1] = config.port & 0xFF;
|
||||
}
|
||||
}
|
||||
|
||||
/* <20><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||
static void w25q32_init(void) {
|
||||
W25Q32_CS_HIGH(); /* <20><>ʼʱƬѡ<C6AC><D1A1><EFBFBD><EFBFBD> */
|
||||
w25q32_wake_up(); /* <20><><EFBFBD><EFBFBD>оƬ */
|
||||
gui_tjc_hmi_read_device_info_from_w25q();
|
||||
gui_tjc_hmi_read_network_config_from_w25q();
|
||||
}
|
||||
|
||||
/* <20><>ȡоƬid */
|
||||
|
||||
Reference in New Issue
Block a user