XBee Firmware Library  1.6.0
Functions
utils.h File Reference

Functions

ssize_t get_line (char **lineptr, size_t limit, uint8_t flags)
 This function reads a line from the serial console. Can be invoked in blocking and non blocking mode. More...
 

Function Documentation

ssize_t get_line ( char **  lineptr,
size_t  limit,
uint8_t  flags 
)

This function reads a line from the serial console. Can be invoked in blocking and non blocking mode.

Parameters
[in]lineptrpointer to the char array where the string read will be stored.
[in]limitmax number of characters for the string that will be read.
[in]flagsmodify the behavior of the function. Supported flags are: O_NONBLOCK - the function doesn't block (otherwise, blocks)
Return values
Thelength of the line read
0If a line has not been captured and non blocking mode has been selected
-EINVALon error