summaryrefslogtreecommitdiff
path: root/shared-module/board/__init__.c
diff options
context:
space:
mode:
Diffstat (limited to 'shared-module/board/__init__.c')
-rw-r--r--shared-module/board/__init__.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/shared-module/board/__init__.c b/shared-module/board/__init__.c
index 914bc4313..8d87a98eb 100644
--- a/shared-module/board/__init__.c
+++ b/shared-module/board/__init__.c
@@ -29,6 +29,8 @@
#include "mpconfigboard.h"
#include "py/runtime.h"
+#include "supervisor/spi_flash_api.h"
+
#if CIRCUITPY_BUSIO
#include "shared-bindings/busio/I2C.h"
#include "shared-bindings/busio/SPI.h"
@@ -89,6 +91,15 @@ mp_obj_t common_hal_board_create_spi(void) {
}
#endif
+#if BOARD_INTERNAL_SPI
+//Provide a reference to the internal SPI, if required.
+mp_obj_t common_hal_board_get_internal_spi(void) {
+ //TODO: can we change the name of this without having to change every instance of spi in every
+ //flash file?
+ return (mp_obj_t)(&spi);
+}
+#endif
+
#if BOARD_UART
mp_obj_t common_hal_board_get_uart(void) {
return MP_STATE_VM(shared_uart_bus);