Rtos code cntains bug possible incompatability with I2C
Fork of mbed-rtos by
Diff: rtx/TARGET_CORTEX_A/rt_MemBox.c
- Revision:
- 103:5a85840ab54e
- Parent:
- 92:bc9729798a19
--- a/rtx/TARGET_CORTEX_A/rt_MemBox.c Fri Feb 12 07:30:12 2016 +0000 +++ b/rtx/TARGET_CORTEX_A/rt_MemBox.c Thu Feb 18 09:45:27 2016 +0000 @@ -101,7 +101,12 @@ #ifndef __USE_EXCLUSIVE_ACCESS int irq_dis; + +#if defined (__ICCARM__) + irq_dis = __disable_irq_iar(); +#else irq_dis = __disable_irq (); +#endif /* __ICCARM__ */ free = ((P_BM) box_mem)->free; if (free) { ((P_BM) box_mem)->free = *free; @@ -152,7 +157,11 @@ } #ifndef __USE_EXCLUSIVE_ACCESS +#if defined (__ICCARM__) + irq_dis = __disable_irq_iar(); +#else irq_dis = __disable_irq (); +#endif /* __ICCARM__ */ *((void **)box) = ((P_BM) box_mem)->free; ((P_BM) box_mem)->free = box; if (!irq_dis) __enable_irq ();