From 6867eef38bd7cd629c57fe6da86f14e68d9225c1 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Thu, 2 Jul 2020 16:25:19 -0700 Subject: [PATCH 1/2] Support Nina 1.6.1 and pins from board --- adafruit_miniesptool.py | 13 ++++++++----- examples/miniesptool_simpletest.py | 14 +++++++++----- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/adafruit_miniesptool.py b/adafruit_miniesptool.py index 4aa29bf..43f1653 100644 --- a/adafruit_miniesptool.py +++ b/adafruit_miniesptool.py @@ -259,7 +259,7 @@ def flash_begin(self, *, size=0, offset=0): number of blocks requred.""" if self._chipfamily == ESP32: self.check_command(ESP_SPI_ATTACH, bytes([0] * 8)) - # We are harcoded for 4MB flash on ESP32 + # We are hardcoded for 4MB flash on ESP32 buffer = struct.pack( " Date: Mon, 6 Jul 2020 15:14:15 -0700 Subject: [PATCH 2/2] Black --- examples/miniesptool_simpletest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/miniesptool_simpletest.py b/examples/miniesptool_simpletest.py index f9ad01e..4b554f6 100644 --- a/examples/miniesptool_simpletest.py +++ b/examples/miniesptool_simpletest.py @@ -15,7 +15,7 @@ uart = busio.UART(tx, rx, baudrate=115200, timeout=1) esptool = adafruit_miniesptool.miniesptool( - uart, DigitalInOut(gpio0pin), DigitalInOut(resetpin), flashsize=4*1024*1024 + uart, DigitalInOut(gpio0pin), DigitalInOut(resetpin), flashsize=4 * 1024 * 1024 ) esptool.sync() @@ -27,7 +27,7 @@ print("MAC ADDR: ", [hex(i) for i in esptool.mac_addr]) # Note: Make sure to use the LATEST nina-fw binary release! -esptool.flash_file("NINA_W102-1.6.1.bin", 0x0, '0326db53e579f8a4293feac70d00f6bb') +esptool.flash_file("NINA_W102-1.6.1.bin", 0x0, "0326db53e579f8a4293feac70d00f6bb") esptool.reset() time.sleep(0.5)