diff options
author | iabdalkader <i.abdalkader@gmail.com> | 2025-01-14 09:40:16 +0100 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2025-01-16 15:25:43 +1100 |
commit | a82fc718a74a75d778e485548330414bad85f070 (patch) | |
tree | d781646571251532bd643517ef0892a5438259e1 | |
parent | a46e84280774a358eb7419de2c07a1ab2868d853 (diff) | |
download | micropython-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.h | 6 |
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) |