Skip to content

Commit a82fc71

Browse files
iabdalkaderdpgeorge
authored andcommitted
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 <[email protected]>
1 parent a46e842 commit a82fc71

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ports/stm32/mpconfigboard_common.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,12 @@
187187
#define MICROPY_HW_SPI_IS_RESERVED(spi_id) (false)
188188
#endif
189189

190+
// Function to determine if the given spi_id is static or not.
191+
// Static SPI instances can be accessed by the user but are not deinit'd on soft reset.
192+
#ifndef MICROPY_HW_SPI_IS_STATIC
193+
#define MICROPY_HW_SPI_IS_STATIC(spi_id) (false)
194+
#endif
195+
190196
// Function to determine if the given tim_id is reserved for system use or not.
191197
#ifndef MICROPY_HW_TIM_IS_RESERVED
192198
#define MICROPY_HW_TIM_IS_RESERVED(tim_id) (false)

0 commit comments

Comments
 (0)