33 lines
729 B
C
33 lines
729 B
C
/*
|
|
* esp_at.h
|
|
*
|
|
* Created on: 09/04/2026
|
|
* Author: carec
|
|
*/
|
|
|
|
#ifndef ESP_AT_H
|
|
#define ESP_AT_H
|
|
|
|
#include "main.h"
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
|
|
extern UART_HandleTypeDef huart1; // UART ligada ao ESP
|
|
extern UART_HandleTypeDef huart2; // debug
|
|
|
|
void ESP_Init(void);
|
|
void ESP_Task(void);
|
|
|
|
bool ESP_SendCmd(const char *cmd, const char *expect, uint32_t timeout);
|
|
bool ESP_StartSoftAP(const char *ssid, const char *pass);
|
|
bool ESP_EnableMultiConn(void);
|
|
bool ESP_StartServer(uint16_t port);
|
|
bool ESP_SendLinkData(int link_id, const char *data);
|
|
bool ESP_CloseLink(int link_id);
|
|
char* ESP_GetBuffer(void);
|
|
void ESP_ClearBuffer(void);
|
|
void ESP_SendData(const char *data);
|
|
void ESP_RxByte(uint8_t b);
|
|
|
|
#endif
|