Trident IoT SDK
Loading...
Searching...
No Matches
tr_cli_buffer.h
Go to the documentation of this file.
1
10#ifndef TR_CLI_BUFFER_H
11#define TR_CLI_BUFFER_H
12
13#include <stdint.h>
14
24
33
40void tr_cli_buffer_byte(uint8_t new_input_char);
41
50
58
63typedef struct
64{
69
73 uint16_t byte_drops;
74
78 uint16_t buffer_size;
79
81
89
94
95
96#endif // TR_CLI_BUFFER_H
tr_cli_buffer_stats_t tr_cli_buffer_get_stats(void)
Reads the current buffer driver statistics.
void tr_cli_buffer_process_bytes(void)
Processes buffered bytes and hands them to the CLI.
void tr_cli_buffer_byte(uint8_t new_input_char)
Stores a byte from the UART in the buffer.
void tr_cli_buffer_clear_stats(void)
Clears the buffer driver statistics.
void tr_cli_buffer_init(void)
Initializes the CLI byte buffer.
Structure containing CLI buffer driver statistics.
Definition tr_cli_buffer.h:64
uint8_t buffer_high_watermark
Maximum number of buffered bytes at any time since stats were cleared.
Definition tr_cli_buffer.h:68
uint16_t buffer_size
Size of the character buffer.
Definition tr_cli_buffer.h:78
uint16_t byte_drops
Number of character drops due to buffer being full.
Definition tr_cli_buffer.h:73