This function reads a line from the serial console. Can be invoked in blocking and non blocking mode.
- Parameters
-
[in] | lineptr | pointer to the char array where the string read will be stored. |
[in] | limit | max number of characters for the string that will be read. |
[in] | flags | modify the behavior of the function. Supported flags are: O_NONBLOCK - the function doesn't block (otherwise, blocks) |
- Return values
-
The | length of the line read |
0 | If a line has not been captured and non blocking mode has been selected |
-EINVAL | on error |