Minor interrupt enable restructure
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2522 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
c6bbe9dc3d
commit
d560096aeb
@ -821,10 +821,9 @@ static void up_restoreusartint(struct up_dev_s *priv, uint32_t imr)
|
||||
|
||||
priv->imr = imr;
|
||||
|
||||
/* And restore the interrupt state */
|
||||
/* And re-enable interrrupts previoulsy disabled by up_disableallints */
|
||||
|
||||
up_serialout(priv, SAM3U_UART_IDR_OFFSET, ~imr);
|
||||
up_serialout(priv, SAM3U_UART_IER_OFFSET, imr);
|
||||
up_enableint(priv);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
@ -842,7 +841,8 @@ static void up_disableallints(struct up_dev_s *priv, uint32_t *imr)
|
||||
|
||||
/* Disable all interrupts */
|
||||
|
||||
up_restoreusartint(priv, 0);
|
||||
priv->imr = 0;
|
||||
up_disableint(priv);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user