32 #include <mraa/uart.h> 34 #include "uartat_defs.h" 51 mraa_uart_context uart;
55 unsigned int cmd_resp_wait_ms;
116 unsigned int baudrate);
126 unsigned int wait_ms);
139 unsigned int millis);
169 unsigned int guard_ms);
211 const char *cmd,
char *resp,
241 char *resp,
size_t resp_len,
242 const char *wait_string,
243 unsigned int millis);
254 UARTAT_FLOW_CONTROL_T fc);
upm_result_t uartat_set_flow_control(const uartat_context dev, UARTAT_FLOW_CONTROL_T fc)
Definition: uartat.c:365
upm_result_t uartat_set_baudrate(const uartat_context dev, unsigned int baudrate)
Definition: uartat.c:166
bool uartat_find(const uartat_context dev, const char *buffer, const char *str)
Definition: uartat.c:396
uartat_context uartat_init_tty(const char *uart_tty, unsigned int baudrate)
Definition: uartat.c:108
void uartat_drain(const uartat_context dev)
Definition: uartat.c:230
void uartat_command(const uartat_context dev, const char *cmd)
Definition: uartat.c:357
int uartat_command_with_response(const uartat_context dev, const char *cmd, char *resp, size_t resp_len)
Definition: uartat.c:250
void uartat_set_response_wait_time(const uartat_context dev, unsigned int wait_ms)
Definition: uartat.c:180
struct _uartat_context * uartat_context
int uartat_write(const uartat_context dev, const char *buffer, size_t len)
Definition: uartat.c:146
bool uartat_data_available(const uartat_context dev, unsigned int millis)
Definition: uartat.c:156
uartat_context uartat_init(unsigned int uart, unsigned int baudrate)
Definition: uartat.c:87
bool uartat_command_mode(const uartat_context dev, const char *cmd_chars, unsigned int guard_ms)
Definition: uartat.c:188
bool uartat_command_waitfor(const uartat_context dev, const char *cmd, char *resp, size_t resp_len, const char *wait_string, unsigned int millis)
Definition: uartat.c:302
void uartat_filter_cr(const uartat_context dev, bool enable)
Definition: uartat.c:405
int uartat_read(const uartat_context dev, char *buffer, size_t len)
Definition: uartat.c:138
void uartat_close(uartat_context dev)
Definition: uartat.c:128
bool uartat_in_command_mode(const uartat_context dev)
Definition: uartat.c:213