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
18
19// init the CLI byte buffer
21
22// store a byte from the UART in the buffer
23void tr_cli_buffer_byte(uint8_t new_input_char);
24
25// empty the bytes from the buffer and hand to the CLI
27
28// clear the stats of the driver
30
31// driver stats, one of these is returned from tr_cli_buffer_get_stats()
32typedef struct
33{
34 // max number of buffered bytes at any time since stats were cleared
36
37 // character drops due to buffer being full
38 uint16_t byte_drops;
39
40 // size of the character buffer
41 uint16_t buffer_size;
42
44
45// read the driver stats
47
48
49#endif // TR_CLI_BUFFER_H
Definition tr_cli_buffer.h:33
uint8_t buffer_high_watermark
Definition tr_cli_buffer.h:35
uint16_t buffer_size
Definition tr_cli_buffer.h:41
uint16_t byte_drops
Definition tr_cli_buffer.h:38
tr_cli_buffer_stats_t tr_cli_buffer_get_stats(void)
void tr_cli_buffer_process_bytes(void)
void tr_cli_buffer_byte(uint8_t new_input_char)
void tr_cli_buffer_clear_stats(void)
void tr_cli_buffer_init(void)