Skip to content

Commit b22a960

Browse files
committed
working on being able to share the SPI Bus
1 parent 912ab82 commit b22a960

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

builder/esp32.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -751,9 +751,13 @@ def compile(): # NOQA
751751
with open(mpconfigboard_path, 'wb') as f:
752752
f.write(data.encode('utf-8'))
753753

754-
machine_hw_spi_src = 'micropy_updates/esp32/machine_hw_spi.c'
755-
machine_hw_spi_dst = 'lib/micropython/ports/esp32/machine_hw_spi.c'
756-
shutil.copyfile(machine_hw_spi_src, machine_hw_spi_dst)
754+
src_path = 'micropy_updates/esp32'
755+
dst_path = 'lib/micropython/ports/esp32'
756+
757+
for file in os.listdir(src_path):
758+
src_file = os.path.join(src_path, file)
759+
dst_file = os.path.join(dst_path, file)
760+
shutil.copyfile(src_file, dst_file)
757761

758762
mpconfigport_path = 'lib/micropython/ports/esp32/mpconfigport.h'
759763

ext_mod/lcd_bus/esp32_src/spi_bus.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ typedef struct _micropy_spi_bus_obj_t {
3131
int8_t mosi;
3232
int8_t miso;
3333
int8_t active_devices;
34-
enum {
35-
} state;
34+
int state;
3635

3736
} micropy_spi_bus_obj_t;
3837

micropy_updates/esp32/machine_sdcard.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ typedef struct _micropy_sd_spi_bus_obj_t {
5656
int8_t mosi;
5757
int8_t miso;
5858
int8_t active_devices;
59-
enum {
60-
} state;
59+
int state;
6160

6261
} micropy_sd_spi_bus_obj_t;
6362

0 commit comments

Comments
 (0)