aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/MSP430X/hal_dma_lld.c
diff options
context:
space:
mode:
authorAndrew Wygle <awygle@gmail.com>2016-05-22 12:41:42 -0700
committerAndrew Wygle <awygle@gmail.com>2016-06-05 13:51:10 -0700
commit456702ee87b1adbbb559778aafe98c349700178a (patch)
treed68bd2207a0cb7ccb2af0db58e7f33c2df168e3b /os/hal/ports/MSP430X/hal_dma_lld.c
parent5d20ce4595a564c1f98a31445f5015de41e1e25f (diff)
downloadChibiOS-Contrib-456702ee87b1adbbb559778aafe98c349700178a.tar.gz
ChibiOS-Contrib-456702ee87b1adbbb559778aafe98c349700178a.tar.bz2
ChibiOS-Contrib-456702ee87b1adbbb559778aafe98c349700178a.zip
Cleaned up MSP430X port to match recent changes to ChibiOS mainline.
Also fixed a couple of bugs identified as part of the refresh.
Diffstat (limited to 'os/hal/ports/MSP430X/hal_dma_lld.c')
-rw-r--r--os/hal/ports/MSP430X/hal_dma_lld.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/os/hal/ports/MSP430X/hal_dma_lld.c b/os/hal/ports/MSP430X/hal_dma_lld.c
index 43e1d6c..2e17afa 100644
--- a/os/hal/ports/MSP430X/hal_dma_lld.c
+++ b/os/hal/ports/MSP430X/hal_dma_lld.c
@@ -89,7 +89,9 @@ PORT_IRQ_HANDLER(DMA_VECTOR) {
if (index < MSP430X_DMA_CHANNELS) {
#if CH_CFG_USE_SEMAPHORES
+ chSysLockFromISR();
chSemSignalI(&dma_lock);
+ chSysUnlockFromISR();
#endif
msp430x_dma_cb_t * cb = &callbacks[index];
@@ -129,7 +131,7 @@ void dmaInit(void) {
bool dmaRequest(msp430x_dma_req_t * request, systime_t timeout) {
/* Check if a DMA channel is available */
#if CH_CFG_USE_SEMAPHORES
- msg_t semresult = chSemWaitTimeout(&dma_lock, timeout);
+ msg_t semresult = chSemWaitTimeoutS(&dma_lock, timeout);
if (semresult != MSG_OK)
return true;
#endif