#include "HW_config.h"
#include "uart_wifi_drv.h"
#include "uart_task.h"
#include "CnCpp.h"

unsigned int wifi_tx_is_busy(void)//1:is busy 0:no busy
{
	if(!get_uart_tx_complete_delay_flag(WIFI_UART))return 1;
	
	return 0;
}

void set_wifi_tx_data(unsigned char * pdata, unsigned int len)
{
	unsigned int i = 0;
	
	if(len > UART_TX_BUF_MAX)return;
	
	uart_tx_over(WIFI_UART, pdata, len);
}

void wifi_app_handle(void)
{
	GetWifiViaUartRx();
}

void uart1_rx_task(void)
{
	if(uart_info_8bit[WIFI_UART].rx_complete){
		uart_info_8bit[WIFI_UART].rx_complete = 0;
		
		wifi_app_handle();
	}
}

void uart_wifi_task(void)
{
	uart1_rx_task();
}
