diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-05-14 08:51:03 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-05-14 08:51:03 +0000 |
commit | 155b0d13536dabeb0eb2f8928e0d2b55640a17cc (patch) | |
tree | 0fcba235bd4d1675feb6d574b8e536d24828c00c /os/hal | |
parent | 1c4c762c0a5796e21a9b628b9bf5ac1e94bd791f (diff) | |
download | ChibiOS-155b0d13536dabeb0eb2f8928e0d2b55640a17cc.tar.gz ChibiOS-155b0d13536dabeb0eb2f8928e0d2b55640a17cc.tar.bz2 ChibiOS-155b0d13536dabeb0eb2f8928e0d2b55640a17cc.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5735 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal')
-rw-r--r-- | os/hal/platforms/SPC5xx/LINFlex_v1/serial_lld.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/os/hal/platforms/SPC5xx/LINFlex_v1/serial_lld.c b/os/hal/platforms/SPC5xx/LINFlex_v1/serial_lld.c index 9907e7a66..b31bd2387 100644 --- a/os/hal/platforms/SPC5xx/LINFlex_v1/serial_lld.c +++ b/os/hal/platforms/SPC5xx/LINFlex_v1/serial_lld.c @@ -142,15 +142,14 @@ static void spc5xx_serve_rxi_interrupt(SerialDriver *sdp) { sts |= SD_NOISE_ERROR;
if (sr & SPC5_UARTSR_PE0)
sts |= SD_PARITY_ERROR;
- if (sts) {
- chSysLockFromIsr();
+ chSysLockFromIsr();
+ if (sts)
chnAddFlagsI(sdp, sts);
- chSysUnlockFromIsr();
- }
if (sr & SPC5_UARTSR_DRF) {
- sdIncomingDataI(sdp, sdp->linflexp->BDRM.B.DATA4);
- sdp->linflexp->UARTSR.R = SPC5_UARTSR_RMB;
+ sdIncomingDataI(sdp, sdp->linflexp->BDRM.B.DATA4);
+ sdp->linflexp->UARTSR.R = SPC5_UARTSR_RMB;
}
+ chSysUnlockFromIsr();
}
/**
@@ -162,6 +161,7 @@ static void spc5xx_serve_txi_interrupt(SerialDriver *sdp) { msg_t b;
sdp->linflexp->UARTSR.R = SPC5_UARTSR_DTF;
+ chSysLockFromIsr();
b = chOQGetI(&sdp->oqueue);
if (b < Q_OK) {
chnAddFlagsI(sdp, CHN_OUTPUT_EMPTY);
@@ -169,6 +169,7 @@ static void spc5xx_serve_txi_interrupt(SerialDriver *sdp) { }
else
sdp->linflexp->BDRL.B.DATA0 = b;
+ chSysUnlockFromIsr();
}
/**
|