diff options
| author | Lucian Copeland <hierophect@gmail.com> | 2020-01-24 14:25:36 -0500 |
|---|---|---|
| committer | Lucian Copeland <hierophect@gmail.com> | 2020-01-24 14:25:36 -0500 |
| commit | 2afca4e942df2f4aa656f6c8a6aa84de581682c9 (patch) | |
| tree | 741f3fe5aa57a2a4d2555f2c9f5b9fa3422a99cb /shared-module/board/__init__.c | |
| parent | d8bc57c1dc159e8493b615fe8091f2722c513cf1 (diff) | |
Fix flash-display conflict error
Diffstat (limited to 'shared-module/board/__init__.c')
| -rw-r--r-- | shared-module/board/__init__.c | 11 |
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); |
