commit
f603143502
6 changed files with 14 additions and 14 deletions
2
.gitmodules
vendored
2
.gitmodules
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 \
|
||||
|
|
@ -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)
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit aa149243fa332f46799aa9c9b4cc6be92d7c4cda
|
||||
Subproject commit 3ecf6bafcf045e0d2705ef49524456801df4f754
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
#
|
||||
|
|
|
|||
Loading…
Reference in a new issue