summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoriabdalkader <i.abdalkader@gmail.com>2025-01-14 09:40:16 +0100
committerDamien George <damien@micropython.org>2025-01-16 15:25:43 +1100
commita82fc718a74a75d778e485548330414bad85f070 (patch)
treed781646571251532bd643517ef0892a5438259e1
parenta46e84280774a358eb7419de2c07a1ab2868d853 (diff)
downloadmicropython-a82fc718a74a75d778e485548330414bad85f070.tar.gz
micropython-a82fc718a74a75d778e485548330414bad85f070.zip
stm32/mpconfigboard_common: Add MICROPY_HW_SPI_IS_STATIC macro.
A board should make this return true if the specified SPI instances should not be deinitialized on soft-reboot. Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
-rw-r--r--ports/stm32/mpconfigboard_common.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/ports/stm32/mpconfigboard_common.h b/ports/stm32/mpconfigboard_common.h
index 5c66b804b2..e1c9c159ec 100644
--- a/ports/stm32/mpconfigboard_common.h
+++ b/ports/stm32/mpconfigboard_common.h
@@ -187,6 +187,12 @@
#define MICROPY_HW_SPI_IS_RESERVED(spi_id) (false)
#endif
+// Function to determine if the given spi_id is static or not.
+// Static SPI instances can be accessed by the user but are not deinit'd on soft reset.
+#ifndef MICROPY_HW_SPI_IS_STATIC
+#define MICROPY_HW_SPI_IS_STATIC(spi_id) (false)
+#endif
+
// Function to determine if the given tim_id is reserved for system use or not.
#ifndef MICROPY_HW_TIM_IS_RESERVED
#define MICROPY_HW_TIM_IS_RESERVED(tim_id) (false)