Skip to content

Commit 390ba40

Browse files
Keyur HariyaKeyur Hariya
authored andcommitted
Replace enable/disable irq with critical section enter/exit
1 parent e6d901a commit 390ba40

File tree

1 file changed

+2
-2
lines changed
  • targets/TARGET_Maxim/TARGET_MAX32625

1 file changed

+2
-2
lines changed

targets/TARGET_Maxim/TARGET_MAX32625/spi_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ int spi_master_block_write(spi_t *obj, const char *tx_buffer, int tx_length, cha
183183
req.deass = 1;
184184
req.callback = NULL;
185185

186-
__disable_irq();
186+
core_util_critical_section_enter();
187187
if (tx_length == rx_length) {
188188
req.tx_data = (uint8_t *)tx_buffer;
189189
req.rx_data = (uint8_t *)rx_buffer;
@@ -214,7 +214,7 @@ int spi_master_block_write(spi_t *obj, const char *tx_buffer, int tx_length, cha
214214
SPIM_Trans(obj->spi, &req);
215215
}
216216
}
217-
__enable_irq();
217+
core_util_critical_section_exit();
218218

219219
while (SPIM_Busy(obj->spi));
220220

0 commit comments

Comments
 (0)