/* Process input UART command and forward to SPI.  */
static sint8 serial_bridge(void)
/* Process input UART command and forward to SPI.  */
static sint8 serial_bridge(void)
{
	sint8 ret;
	uint8_t *usart_data;
	uint32_t usart_size;
	tstrWifiInitParam param;
	memset(&param, 0, sizeof(param));
	param.pfAppWifiCb = NULL;
	ret = os_m2m_wifi_init(&param);
	if (ret != M2M_SUCCESS) {
		puts("Failed to put the Initialize the Chip!\n");
		return M2M_ERR_INIT;
	}
	usart_stream_reset();
	while (1) {
		if (usart_stream_read(&usart_data, &usart_size) != 0) {
			continue;
		}
		usart_frame_parse(usart_data, usart_size);
	}
	return 0;
}