mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 01:43:35 +08:00
Merge branch 'px4io-i2c-memory-squeeze' of github.com:PX4/Firmware into px4io-i2c-memory-squeeze
This commit is contained in:
@@ -126,7 +126,7 @@ static inline int readline_rawgetc(int infd)
|
|||||||
* error occurs).
|
* error occurs).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
do
|
for (;;)
|
||||||
{
|
{
|
||||||
/* Read one character from the incoming stream */
|
/* Read one character from the incoming stream */
|
||||||
|
|
||||||
@@ -154,13 +154,21 @@ static inline int readline_rawgetc(int infd)
|
|||||||
{
|
{
|
||||||
return -errcode;
|
return -errcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if (buffer == '\0')
|
||||||
|
{
|
||||||
|
/* Ignore NUL characters, since they look like EOF to our caller */
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Success, return the character that was read */
|
||||||
|
|
||||||
|
return (int)buffer;
|
||||||
}
|
}
|
||||||
while (nread < 1);
|
|
||||||
|
|
||||||
/* On success, return the character that was read */
|
|
||||||
|
|
||||||
return (int)buffer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
Reference in New Issue
Block a user