/*
 * esp8266.h
 *
 *  Created on: 2025Äê10ÔÂ18ÈÕ
 *      Author: LHYe200
 */

#ifndef CODE_ESP8266_H_
#define CODE_ESP8266_H_

#include "zf_common_typedef.h"

#define ESP8266_IO0             P20_9
#define ESP8266_IO2             P20_8
#define ESP8266_IO15            P20_7
#define ESP8266_RST             P20_3
#define ESP8266_EN              P20_6

#define ESP8266_UART_CHANNEL    UART_2
#define ESP8266_UART_BAUDRATE   115200
#define ESP8266_UART_TX_PIN     UART2_TX_P33_9
#define ESP8266_UART_RX_PIN     UART2_RX_P33_8


extern uint8 esp8266_download_passthrough;

void ESP8266_Init(void);
void ESP8266_send_data(uint8 *data, uint32 len);
void ESP8266_Auto_Download_Uart_Hook(void);
void ESP8266_Uart_Callback(void);
void ESP8266_Main_Loop_Change_Mode(void);

#endif /* CODE_ESP8266_H_ */
