Skip to content

Commit

Permalink
[USART] clear and disable Rx timeout if no handler is installed to av…
Browse files Browse the repository at this point in the history
…oid repeated raising of this interrupt
  • Loading branch information
Alexander Pertsch committed Jul 6, 2022
1 parent e568a4f commit cf63435
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions peripheral/usart_6089/templates/plib_usart.c.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,11 @@ void ${USART_INSTANCE_NAME}_InterruptHandler( void )
{
${USART_INSTANCE_NAME?lower_case}Obj.rxTimeoutCallback(${USART_INSTANCE_NAME?lower_case}Obj.rxTimeoutContext);
}
else
{
/* clear and disable timer to avoid re-raising the timout, reset should be controlled by rxTimeoutCallback */
${USART_INSTANCE_NAME}_ClearReadTimeout();
}
}

/* Receiver status */
Expand Down

0 comments on commit cf63435

Please sign in to comment.