Improved serial driver errors.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10038 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
Giovanni Di Sirio 2017-01-12 12:57:16 +00:00
parent d7a0be7d7f
commit ad23374705
2 changed files with 2 additions and 1 deletions

View File

@ -40,6 +40,7 @@
#define SD_OVERRUN_ERROR (eventflags_t)128 /**< @brief Overflow. */
#define SD_NOISE_ERROR (eventflags_t)256 /**< @brief Line noise. */
#define SD_BREAK_DETECTED (eventflags_t)512 /**< @brief LIN Break. */
#define SD_QUEUE_FULL_ERROR (eventflags_t)1024 /**< @brief Queue full. */
/** @} */
/*===========================================================================*/

View File

@ -218,7 +218,7 @@ void sdIncomingDataI(SerialDriver *sdp, uint8_t b) {
if (iqIsEmptyI(&sdp->iqueue))
chnAddFlagsI(sdp, CHN_INPUT_AVAILABLE);
if (iqPutI(&sdp->iqueue, b) < MSG_OK)
chnAddFlagsI(sdp, SD_OVERRUN_ERROR);
chnAddFlagsI(sdp, SD_QUEUE_FULL_ERROR);
}
/**