Skip to content

Commit

Permalink
Merge pull request adafruit#9607 from tannewt/idf5.3.1
Browse files Browse the repository at this point in the history
Update to IDF 5.3.1
  • Loading branch information
dhalbert authored Sep 10, 2024
2 parents 561578f + bd9cff5 commit f603143
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
[submodule "ports/espressif/esp-idf"]
path = ports/espressif/esp-idf
url = https://github.com/adafruit/esp-idf.git
branch = circuitpython-v5.3
branch = circuitpython-v5.3.1
[submodule "ports/espressif/esp-protocols"]
path = ports/espressif/esp-protocols
url = https://github.com/espressif/esp-protocols.git
Expand Down
8 changes: 4 additions & 4 deletions ports/espressif/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ CFLAGS += -DSTACK_CANARY_VALUE=0xa5a5a5a5
# one must provide `-u` arguments to state the symbols are missing. This would
# normally happen implicitly by another function calling to these.
REGISTRATION_FUNCTIONS = \
-u newlib_include_pthread_impl \
-u ld_include_highint_hdl \
-u __cxx_fatal_exception \
-u esp_app_desc \
Expand All @@ -169,8 +168,10 @@ REGISTRATION_FUNCTIONS = \
-u newlib_include_syscalls_impl \
-u newlib_include_pthread_impl \
-u newlib_include_assert_impl \
-u newlib_include_getentropy_impl \
-u newlib_include_init_funcs
-u newlib_include_init_funcs \
-u include_esp_phy_override \
-u vfs_include_syscalls_impl


#Debugging/Optimization
ifeq ($(DEBUG), 1)
Expand Down Expand Up @@ -311,7 +312,6 @@ CHIP_COMPONENTS = \
else ifeq ($(IDF_TARGET),esp32s3)
LDFLAGS += \
-Tesp32s3.rom.newlib.ld \
-Tesp32s3.rom.newlib-time.ld \
-Tesp32s3.rom.version.ld \
-Tesp32s3.rom.systimer.ld \
-Tesp32s3.rom.wdt.ld
Expand Down
13 changes: 5 additions & 8 deletions ports/espressif/common-hal/busio/I2C.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
mp_raise_ValueError(MP_ERROR_TEXT("All I2C peripherals are in use"));
}

// Delete any previous driver.
i2c_driver_delete(self->i2c_num);

const i2c_config_t i2c_conf = {
.mode = I2C_MODE_MASTER,
.sda_io_num = self->sda_pin->number,
Expand Down Expand Up @@ -136,7 +133,7 @@ static esp_err_t i2c_zero_length_write(busio_i2c_obj_t *self, uint8_t addr, Tick
}

bool common_hal_busio_i2c_probe(busio_i2c_obj_t *self, uint8_t addr) {
esp_err_t result = i2c_zero_length_write(self, addr, 1);
esp_err_t result = i2c_zero_length_write(self, addr, pdMS_TO_TICKS(10));
return result == ESP_OK;
}

Expand Down Expand Up @@ -175,21 +172,21 @@ static uint8_t convert_esp_err(esp_err_t result) {

uint8_t common_hal_busio_i2c_write(busio_i2c_obj_t *self, uint16_t addr, const uint8_t *data, size_t len) {
return convert_esp_err(len == 0
? i2c_zero_length_write(self, addr, 100)
: i2c_master_write_to_device(self->i2c_num, (uint8_t)addr, data, len, 100 /* wait in ticks */)
? i2c_zero_length_write(self, addr, pdMS_TO_TICKS(1000))
: i2c_master_write_to_device(self->i2c_num, (uint8_t)addr, data, len, pdMS_TO_TICKS(1000))
);
}

uint8_t common_hal_busio_i2c_read(busio_i2c_obj_t *self, uint16_t addr, uint8_t *data, size_t len) {
return convert_esp_err(
i2c_master_read_from_device(self->i2c_num, (uint8_t)addr, data, len, 100 /* wait in ticks */));
i2c_master_read_from_device(self->i2c_num, (uint8_t)addr, data, len, pdMS_TO_TICKS(1000)));
}

uint8_t common_hal_busio_i2c_write_read(busio_i2c_obj_t *self, uint16_t addr,
uint8_t *out_data, size_t out_len, uint8_t *in_data, size_t in_len) {
return convert_esp_err(
i2c_master_write_read_device(self->i2c_num, (uint8_t)addr,
out_data, out_len, in_data, in_len, 100 /* wait in ticks */));
out_data, out_len, in_data, in_len, pdMS_TO_TICKS(1000)));
}

void common_hal_busio_i2c_never_reset(busio_i2c_obj_t *self) {
Expand Down
2 changes: 1 addition & 1 deletion ports/espressif/esp-idf
Submodule esp-idf updated 716 files
2 changes: 2 additions & 0 deletions ports/espressif/esp-idf-config/sdkconfig-debug.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ CONFIG_COMPILER_OPTIMIZATION_SIZE=y
#
CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y
CONFIG_ESP_PANIC_HANDLER_IRAM=y
CONFIG_ESP_CONSOLE_SECONDARY_NONE=y
# CONFIG_ESP_CONSOLE_SECONDARY_USB_SERIAL_JTAG is not set
# end of ESP System Settings

# end of Component config
Expand Down
1 change: 1 addition & 0 deletions ports/espressif/esp-idf-config/sdkconfig.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ CONFIG_MBEDTLS_SSL_PROTO_DTLS=y
# CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED is not set
# CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED is not set
# CONFIG_MBEDTLS_ECP_FIXED_POINT_OPTIM is not set
# CONFIG_MBEDTLS_ERROR_STRINGS is not set
# end of mbedTLS

#
Expand Down

0 comments on commit f603143

Please sign in to comment.