Trident IoT SDK
Loading...
Searching...
No Matches

CLI buffer management for handling incoming UART data. More...

Collaboration diagram for buffer:

Data Structures

struct  tr_cli_buffer_stats_t
 Structure containing CLI buffer driver statistics. More...

Functions

void tr_cli_buffer_init (void)
 Initializes the CLI byte buffer.
void tr_cli_buffer_byte (uint8_t new_input_char)
 Stores a byte from the UART in the buffer.
void tr_cli_buffer_process_bytes (void)
 Processes buffered bytes and hands them to the CLI.
void tr_cli_buffer_clear_stats (void)
 Clears the buffer driver statistics.
tr_cli_buffer_stats_t tr_cli_buffer_get_stats (void)
 Reads the current buffer driver statistics.

Detailed Description

CLI buffer management for handling incoming UART data.

Function Documentation

◆ tr_cli_buffer_byte()

void tr_cli_buffer_byte ( uint8_t new_input_char)

Stores a byte from the UART in the buffer.

Parameters
[in]new_input_charThe character received from UART to be buffered.

◆ tr_cli_buffer_clear_stats()

void tr_cli_buffer_clear_stats ( void )

Clears the buffer driver statistics.

Resets all statistical counters to zero.

◆ tr_cli_buffer_get_stats()

tr_cli_buffer_stats_t tr_cli_buffer_get_stats ( void )

Reads the current buffer driver statistics.

Returns
Current statistics for the CLI buffer driver.

◆ tr_cli_buffer_init()

void tr_cli_buffer_init ( void )

Initializes the CLI byte buffer.

This function initializes the internal buffer used for storing incoming UART characters before they are processed by the CLI system.

◆ tr_cli_buffer_process_bytes()

void tr_cli_buffer_process_bytes ( void )

Processes buffered bytes and hands them to the CLI.

This function empties the buffer and processes all stored characters through the CLI command parser.