diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-01-06 12:55:12 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2010-01-06 12:55:12 +0000 |
commit | 7e4202ae46606be697611dd6f5f867c4915dc046 (patch) | |
tree | ee0036f9ad934743d02dfe0e3b4cfe7a01e63d92 /os/hal/platforms/MSP430/serial_lld.c | |
parent | bc489e39a8036bd8cc70569ac8e31ec257d68747 (diff) | |
download | ChibiOS-7e4202ae46606be697611dd6f5f867c4915dc046.tar.gz ChibiOS-7e4202ae46606be697611dd6f5f867c4915dc046.tar.bz2 ChibiOS-7e4202ae46606be697611dd6f5f867c4915dc046.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1506 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/MSP430/serial_lld.c')
-rw-r--r-- | os/hal/platforms/MSP430/serial_lld.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/os/hal/platforms/MSP430/serial_lld.c b/os/hal/platforms/MSP430/serial_lld.c index fd9dc19bf..acc8a8357 100644 --- a/os/hal/platforms/MSP430/serial_lld.c +++ b/os/hal/platforms/MSP430/serial_lld.c @@ -79,10 +79,11 @@ static void set_error(SerialDriver *sdp, uint8_t urctl) { static void notify1(void) {
if (!(U0IE & UTXIE0)) {
- chSysLockFromIsr();
- U0TXBUF = (uint8_t)sdRequestDataI(&SD1);
- chSysUnlockFromIsr();
- U0IE |= UTXIE0;
+ msg_t b = sdRequestDataI(&SD1);
+ if (b != Q_EMPTY) {
+ U0IE |= UTXIE0;
+ U0TXBUF = (uint8_t)b;
+ }
}
}
@@ -122,8 +123,11 @@ static void usart0_deinit(void) { static void notify2(void) {
if (!(U1IE & UTXIE1)) {
- U1TXBUF = (uint8_t)sdRequestDataI(&SD2);
- U1IE |= UTXIE1;
+ msg_t b = sdRequestDataI(&SD2);
+ if (b != Q_EMPTY) {
+ U1IE |= UTXIE1;
+ U1TXBUF = (uint8_t)b;
+ }
}
}
|