ESPTerm - ESP8266 terminal emulator. Branches: [master] patches, [work] next release
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
espterm-firmware/user/uart_handler.h

28 lines
661 B

/**
* UART init & async rx module.
*
* Call UART_Init(), UART_SetupAsyncReceiver() and
* define UART_HandleRxByte() somewhere in application code.
*
* Call UART_PollRx() to allow rx in a blocking handler.
*/
#ifndef UART_HANDLER_H
#define UART_HANDLER_H
#include <esp8266.h>
/** Configure UART periphs and enable pins - does not set baud rate, parity and stopbits */
void UART_Init(void);
/** Configure async Rx on UART0 */
void UART_SetupAsyncReceiver(void);
/** User must provide this func for handling received bytes */
extern void UART_HandleRxByte(char c);
/** Poll uart manually while waiting for something */
void UART_PollRx(void);
#endif