ch32f208wb mqtt 你们的例程好像有问题。我将 mqtt合到bleusb中只要打开这个语句 就出错
i = ETH_LibInit(IPAddr,GWIPAddr,IPMask,MACAddr); //Ethernet library initialize
int main(void)
{
int i;
SystemCoreClockUpdate();
Delay_Init();
#ifdef DEBUG
USART_Printf_Init( 115200 );
#endif
#if 0
PRINT("%s\n", VER_LIB);
WCHBLE_Init();
HAL_Init();
GAPRole_PeripheralInit();
Peripheral_Init();
USBFS_Init( );
#endif
PRINT("net version:%x\n",WCHNET_GetVer());
if(WCHNET_LIB_VER != WCHNET_GetVer()){
PRINT("version error.\n");
}
WCHNET_GetMacAddr(MACAddr); //get the chip MAC address
PRINT("mac addr:");
for(i = 0; i < 6; i++)
PRINT("%x ",MACAddr[i]);
PRINT("\n");
TIM2_Init();
i = ETH_LibInit(IPAddr,GWIPAddr,IPMask,MACAddr); //Ethernet library initialize
mStopIfError(i);
if(i == WCHNET_ERR_SUCCESS) PRINT("WCHNET_LibInit Success\r\n");
Transport_Open(); //open the TCP connection.
Main_Circulation();
}