diff --git a/CHANGELOG b/CHANGELOG index 82c44b9..534b7f7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +Adafruit's Arduino NINA-W102 firmware 1.7.2 - 2021.03.22 + +* Changed Analog Write to use full PWM range. +* Added support to Pin Mode for INPUT_PULLUP. + Adafruit's Arduino NINA-W102 firmware 1.7.1 - 2020.10.24 * Enable HCI BLE for AirLift boards and breakouts. diff --git a/Makefile b/Makefile index a89ef8e..83a947f 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ load-passthrough: cp passthrough.UF2 $(BOOT_VOLUME) load-nina: - esptool.py --port $(M4_PORT) --before no_reset --baud $(UPLOAD_BAUD) write_flash 0 NINA_W102-1.7.1.bin + esptool.py --port $(M4_PORT) --before no_reset --baud $(UPLOAD_BAUD) write_flash 0 NINA_W102-1.7.2.bin load-circuitpython: cp $(CIRCUITPYTHON_UF2) $(BOOT_VOLUME) diff --git a/arduino/cores/esp32/wiring_analog.c b/arduino/cores/esp32/wiring_analog.c index 9b80a0c..d33d048 100644 --- a/arduino/cores/esp32/wiring_analog.c +++ b/arduino/cores/esp32/wiring_analog.c @@ -38,7 +38,7 @@ void analogWrite(uint32_t pin, uint32_t value) ledc_channel_config_t ledc_conf = { .channel = (pin % 7), - .duty = (value << 2), + .duty = (value << 2) | ((value & 0xC0) >> 6), .gpio_num = pin, .intr_type = LEDC_INTR_DISABLE, .speed_mode = LEDC_HIGH_SPEED_MODE, diff --git a/arduino/cores/esp32/wiring_digital.c b/arduino/cores/esp32/wiring_digital.c index 05435df..2bfdbda 100644 --- a/arduino/cores/esp32/wiring_digital.c +++ b/arduino/cores/esp32/wiring_digital.c @@ -33,6 +33,11 @@ void pinMode(uint32_t pin, uint32_t mode) gpio_set_direction((gpio_num_t)pin, GPIO_MODE_OUTPUT); gpio_set_pull_mode((gpio_num_t)pin, GPIO_FLOATING); break; + + case INPUT_PULLUP: + gpio_set_direction((gpio_num_t)pin, GPIO_MODE_INPUT); + gpio_set_pull_mode((gpio_num_t)pin, GPIO_PULLUP_ONLY); + break; } PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[pin], PIN_FUNC_GPIO); diff --git a/arduino/cores/esp32/wiring_digital.h b/arduino/cores/esp32/wiring_digital.h index 6788aeb..02c190f 100644 --- a/arduino/cores/esp32/wiring_digital.h +++ b/arduino/cores/esp32/wiring_digital.h @@ -31,6 +31,7 @@ extern "C" { #define INPUT 0x00 #define OUTPUT 0x01 +#define INPUT_PULLUP 0x02 extern void pinMode(uint32_t pin, uint32_t mode); diff --git a/combine.py b/combine.py index fcc41ad..56dc55f 100644 --- a/combine.py +++ b/combine.py @@ -31,7 +31,7 @@ for i in range(0, len(certsData)): # zero terminate the pem file outputData[0x10000 + len(certsData)] = 0 -outputFilename = "NINA_W102-1.7.1.bin" +outputFilename = "NINA_W102-1.7.2.bin" if (len(sys.argv) > 1): outputFilename = sys.argv[1] diff --git a/main/CommandHandler.cpp b/main/CommandHandler.cpp index 7e25385..a14af43 100644 --- a/main/CommandHandler.cpp +++ b/main/CommandHandler.cpp @@ -28,7 +28,7 @@ #include "Arduino.h" -const char FIRMWARE_VERSION[6] = "1.7.1"; +const char FIRMWARE_VERSION[6] = "1.7.2"; // Optional, user-defined X.509 certificate char CERT_BUF[1300];