diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2019-01-18 16:37:06 -0800 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2019-01-18 16:37:06 -0800 |
| commit | edc8383e2297156134a58067899eefacd5764802 (patch) | |
| tree | 468440ffcafd58c46a73931319c3f3ea4c4a1718 /supervisor | |
| parent | ae52c964c2cdb91643b05f180353d95895260245 (diff) | |
Improvements thanks to danh's review
Diffstat (limited to 'supervisor')
| -rw-r--r-- | supervisor/shared/board_busses.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/supervisor/shared/board_busses.c b/supervisor/shared/board_busses.c index ed1f98a58..8a1c7bf86 100644 --- a/supervisor/shared/board_busses.c +++ b/supervisor/shared/board_busses.c @@ -66,6 +66,8 @@ mp_obj_t board_i2c(void) { MP_DEFINE_CONST_FUN_OBJ_0(board_i2c_obj, board_i2c); #if BOARD_SPI +// Statically allocate the SPI object so it can live past the end of the heap and into the next VM. +// That way it can be used by built-in FourWire displays and be accessible through board.SPI(). STATIC busio_spi_obj_t spi_obj; STATIC mp_obj_t spi_singleton = NULL; |
