diff options
| author | wdfk-prog <[email protected]> | 2025-11-13 11:21:49 +0800 |
|---|---|---|
| committer | R b b666 <[email protected]> | 2025-11-13 15:41:41 +0800 |
| commit | ddfe2cd61cbe39e0f8fc200b6ef21ab223c842ca (patch) | |
| tree | a4e854ff1b1cd0db0758d490dcc100a811b426dd /components/drivers/include | |
| parent | ec27e09df897dbdf396d25550fc599b5a4d75c90 (diff) | |
feat[spi]: enable interrupt-safe operations using spinlocks
Diffstat (limited to 'components/drivers/include')
| -rw-r--r-- | components/drivers/include/drivers/dev_spi.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/components/drivers/include/drivers/dev_spi.h b/components/drivers/include/drivers/dev_spi.h index 195ba4b6ee..4a0ac92c88 100644 --- a/components/drivers/include/drivers/dev_spi.h +++ b/components/drivers/include/drivers/dev_spi.h @@ -8,6 +8,7 @@ * 2012-11-23 Bernard Add extern "C" * 2020-06-13 armink fix the 3 wires issue * 2022-09-01 liYony fix api rt_spi_sendrecv16 about MSB and LSB bug + * 2025-10-30 wdfk-prog enable interrupt-safe operations using spinlocks */ #ifndef __DEV_SPI_H__ @@ -181,6 +182,10 @@ struct rt_spi_bus #endif /* RT_USING_DM */ struct rt_mutex lock; +#ifdef RT_USING_SPI_ISR + rt_base_t _isr_lvl; + struct rt_spinlock _spinlock; +#endif /* RT_USING_SPI_ISR */ struct rt_spi_device *owner; }; |
