55 lines
1.0 KiB
C
Raw Permalink Normal View History

/**
* @file esp32s.c
* @author Myth
* @version 0.1
* @date 2021.10.16
* @brief ESP32-S
*/
#include "uart.h"
#include "esp32s.h"
/**
* @brief ESP32-S UART_Init
*/
void ESP32S_Init(void)
{
}
/**
* @brief ESP32-S
* @param pdata:
* @param len :
*/
void ESP32S_Send(uint8_t *pdata, uint8_t len)
{
UART_SendBuff(ESP32S_COM, pdata, len);
}
/**
* @brief ESP32-S
* @param pbyte:
* @retval 0 1
*/
uint8_t ESP32S_ReceiveByte(uint8_t *pbyte)
{
return UART_GetChar(ESP32S_COM, pbyte);
}
/**
* @brief ESP32-S
*/
void ESP32S_ClearRx(void)
{
UART_ClearRxFIFO(ESP32S_COM);
}
/**
* @brief ESP32-S
*/
void ESP32S_ClearTx(void)
{
UART_ClearTxFIFO(ESP32S_COM);
}