Skip to content

Commit 2baa0dc

Browse files
committed
fix(build): IDF release/v5.3 466a392a and initial changes
1 parent def319a commit 2baa0dc

File tree

27 files changed

+368
-538
lines changed

27 files changed

+368
-538
lines changed

Diff for: .github/scripts/on-release.sh

+4-16
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,8 @@ find "$PKG_DIR" -name '*.git*' -type f -delete
219219
##
220220
RVTC_NAME="riscv32-esp-elf-gcc"
221221
RVTC_NEW_NAME="esp-rv32"
222-
X32TC_NAME="xtensa-esp32-elf-gcc"
222+
X32TC_NAME="xtensa-esp-elf-gcc"
223223
X32TC_NEW_NAME="esp-x32"
224-
XS2TC_NAME="xtensa-esp32s2-elf-gcc"
225-
XS2TC_NEW_NAME="esp-xs2"
226-
XS3TC_NAME="xtensa-esp32s3-elf-gcc"
227-
XS3TC_NEW_NAME="esp-xs3"
228224

229225
# Replace tools locations in platform.txt
230226
echo "Generating platform.txt..."
@@ -234,8 +230,8 @@ sed 's/tools\.esp32-arduino-libs\.path\.windows=.*//g' | \
234230
sed 's/{runtime\.platform\.path}.tools.esp32-arduino-libs/\{runtime.tools.esp32-arduino-libs.path\}/g' | \
235231
sed 's/{runtime\.platform\.path}.tools.xtensa-esp-elf-gdb/\{runtime.tools.xtensa-esp-elf-gdb.path\}/g' | \
236232
sed "s/{runtime\.platform\.path}.tools.xtensa-esp32-elf/\\{runtime.tools.$X32TC_NEW_NAME.path\\}/g" | \
237-
sed "s/{runtime\.platform\.path}.tools.xtensa-esp32s2-elf/\\{runtime.tools.$XS2TC_NEW_NAME.path\\}/g" | \
238-
sed "s/{runtime\.platform\.path}.tools.xtensa-esp32s3-elf/\\{runtime.tools.$XS3TC_NEW_NAME.path\\}/g" | \
233+
sed "s/{runtime\.platform\.path}.tools.xtensa-esp32s2-elf/\\{runtime.tools.$X32TC_NEW_NAME.path\\}/g" | \
234+
sed "s/{runtime\.platform\.path}.tools.xtensa-esp32s3-elf/\\{runtime.tools.$X32TC_NEW_NAME.path\\}/g" | \
239235
sed 's/{runtime\.platform\.path}.tools.riscv32-esp-elf-gdb/\{runtime.tools.riscv32-esp-elf-gdb.path\}/g' | \
240236
sed "s/{runtime\.platform\.path}.tools.riscv32-esp-elf/\\{runtime.tools.$RVTC_NEW_NAME.path\\}/g" | \
241237
sed 's/{runtime\.platform\.path}.tools.esptool/\{runtime.tools.esptool_py.path\}/g' | \
@@ -355,15 +351,7 @@ rvtc_jq_arg="\
355351
(.packages[0].platforms[0].toolsDependencies[] | select(.name==\"$X32TC_NAME\")).version = \"$RVTC_VERSION\" |\
356352
(.packages[0].platforms[0].toolsDependencies[] | select(.name==\"$X32TC_NAME\")).name = \"$X32TC_NEW_NAME\" |\
357353
(.packages[0].tools[] | select(.name==\"$X32TC_NAME\")).version = \"$RVTC_VERSION\" |\
358-
(.packages[0].tools[] | select(.name==\"$X32TC_NAME\")).name = \"$X32TC_NEW_NAME\" |\
359-
(.packages[0].platforms[0].toolsDependencies[] | select(.name==\"$XS2TC_NAME\")).version = \"$RVTC_VERSION\" |\
360-
(.packages[0].platforms[0].toolsDependencies[] | select(.name==\"$XS2TC_NAME\")).name = \"$XS2TC_NEW_NAME\" |\
361-
(.packages[0].tools[] | select(.name==\"$XS2TC_NAME\")).version = \"$RVTC_VERSION\" |\
362-
(.packages[0].tools[] | select(.name==\"$XS2TC_NAME\")).name = \"$XS2TC_NEW_NAME\" |\
363-
(.packages[0].platforms[0].toolsDependencies[] | select(.name==\"$XS3TC_NAME\")).version = \"$RVTC_VERSION\" |\
364-
(.packages[0].platforms[0].toolsDependencies[] | select(.name==\"$XS3TC_NAME\")).name = \"$XS3TC_NEW_NAME\" |\
365-
(.packages[0].tools[] | select(.name==\"$XS3TC_NAME\")).version = \"$RVTC_VERSION\" |\
366-
(.packages[0].tools[] | select(.name==\"$XS3TC_NAME\")).name = \"$XS3TC_NEW_NAME\""
354+
(.packages[0].tools[] | select(.name==\"$X32TC_NAME\")).name = \"$X32TC_NEW_NAME\""
367355
cat "$PACKAGE_JSON_TEMPLATE" | jq "$rvtc_jq_arg" > "$OUTPUT_DIR/package-$LIBS_PROJ_NAME-rvfix.json"
368356
PACKAGE_JSON_TEMPLATE="$OUTPUT_DIR/package-$LIBS_PROJ_NAME-rvfix.json"
369357

Diff for: .github/workflows/push.yml

+22-21
Original file line numberDiff line numberDiff line change
@@ -194,28 +194,29 @@ jobs:
194194
- name: Build Sketches
195195
run: bash ./.github/scripts/on-push.sh
196196

197-
# PlatformIO on Windows, Ubuntu and Mac
198-
build-platformio:
199-
name: PlatformIO on ${{ matrix.os }}
200-
needs: gen-chunks
201-
if: |
202-
needs.gen-chunks.outputs.build_all == 'true' ||
203-
needs.gen-chunks.outputs.build_static_sketches == 'true' ||
204-
needs.gen-chunks.outputs.build_platformio == 'true'
205-
runs-on: ${{ matrix.os }}
206-
strategy:
207-
fail-fast: false
208-
matrix:
209-
os: [ubuntu-latest, windows-latest, macOS-latest]
197+
# # PlatformIO on Windows, Ubuntu and Mac
198+
# build-platformio:
199+
# name: PlatformIO on ${{ matrix.os }}
200+
# needs: gen-chunks
201+
# if: |
202+
# needs.gen-chunks.outputs.build_all == 'true' ||
203+
# needs.gen-chunks.outputs.build_static_sketches == 'true' ||
204+
# needs.gen-chunks.outputs.build_platformio == 'true'
205+
# runs-on: ${{ matrix.os }}
206+
# strategy:
207+
# fail-fast: false
208+
# matrix:
209+
# os: [ubuntu-latest, windows-latest, macOS-latest]
210210

211-
steps:
212-
- uses: actions/checkout@v4
213-
- uses: actions/setup-python@v5
214-
with:
215-
python-version: '3.x'
216-
- name: Build Sketches
217-
run: bash ./.github/scripts/on-push.sh 1 1 #equal and non-zero to trigger PIO
211+
# steps:
212+
# - uses: actions/checkout@v4
213+
# - uses: actions/setup-python@v5
214+
# with:
215+
# python-version: '3.x'
216+
# - name: Build Sketches
217+
# run: bash ./.github/scripts/on-push.sh 1 1 #equal and non-zero to trigger PIO
218218

219+
# ESP-IDF component build
219220
build-esp-idf-component:
220221
name: Build with ESP-IDF ${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
221222
needs: gen-chunks
@@ -231,7 +232,7 @@ jobs:
231232
# See https://hub.docker.com/r/espressif/idf/tags and
232233
# https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-docker-image.html
233234
# for details.
234-
idf_ver: ["release-v5.1"]
235+
idf_ver: ["release-v5.3"]
235236
idf_target: ["esp32", "esp32s2", "esp32s3", "esp32c2", "esp32c3", "esp32c6", "esp32h2"]
236237
container: espressif/idf:${{ matrix.idf_ver }}
237238
steps:

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
tools/esp32-arduino-libs
2+
tools/xtensa-esp-elf
23
tools/xtensa-esp32-elf
34
tools/xtensa-esp32s2-elf
45
tools/xtensa-esp32s3-elf

Diff for: CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
# export ARDUINO_SKIP_IDF_VERSION_CHECK=1
66
# idf.py build
77

8-
set(min_supported_idf_version "5.1.0")
9-
set(max_supported_idf_version "5.1.99")
8+
set(min_supported_idf_version "5.3.0")
9+
set(max_supported_idf_version "5.3.99")
1010
set(idf_version "${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}.${IDF_VERSION_PATCH}")
1111

1212
if ("${idf_version}" AND NOT "$ENV{ARDUINO_SKIP_IDF_VERSION_CHECK}")

Diff for: cores/esp32/Client.h

+2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@
2626
class Client : public Stream {
2727
public:
2828
virtual int connect(IPAddress ip, uint16_t port) = 0;
29+
virtual int connect(IPAddress ip, uint16_t port, int32_t timeout) = 0;
2930
virtual int connect(const char *host, uint16_t port) = 0;
31+
virtual int connect(const char *host, uint16_t port, int32_t timeout) = 0;
3032
virtual size_t write(uint8_t) = 0;
3133
virtual size_t write(const uint8_t *buf, size_t size) = 0;
3234
virtual int available() = 0;

Diff for: cores/esp32/HWCDC.cpp

+8-8
Original file line numberDiff line numberDiff line change
@@ -286,14 +286,14 @@ bool HWCDC::deinit(void *busptr) {
286286
running = true;
287287
// Setting USB D+ D- pins
288288
bool retCode = true;
289-
retCode &= perimanClearPinBus(USB_DM_GPIO_NUM);
290-
retCode &= perimanClearPinBus(USB_DP_GPIO_NUM);
289+
retCode &= perimanClearPinBus(USB_INT_PHY0_DM_GPIO_NUM);
290+
retCode &= perimanClearPinBus(USB_INT_PHY0_DP_GPIO_NUM);
291291
if (retCode) {
292292
// Force the host to re-enumerate (BUS_RESET)
293-
pinMode(USB_DM_GPIO_NUM, OUTPUT_OPEN_DRAIN);
294-
pinMode(USB_DP_GPIO_NUM, OUTPUT_OPEN_DRAIN);
295-
digitalWrite(USB_DM_GPIO_NUM, LOW);
296-
digitalWrite(USB_DP_GPIO_NUM, LOW);
293+
pinMode(USB_INT_PHY0_DM_GPIO_NUM, OUTPUT_OPEN_DRAIN);
294+
pinMode(USB_INT_PHY0_DP_GPIO_NUM, OUTPUT_OPEN_DRAIN);
295+
digitalWrite(USB_INT_PHY0_DM_GPIO_NUM, LOW);
296+
digitalWrite(USB_INT_PHY0_DP_GPIO_NUM, LOW);
297297
}
298298
// release the flag
299299
running = false;
@@ -323,11 +323,11 @@ void HWCDC::begin(unsigned long baud) {
323323
// delay(10); // USB Host has to enumerate it again
324324

325325
// Peripheral Manager setting for USB D+ D- pins
326-
uint8_t pin = USB_DM_GPIO_NUM;
326+
uint8_t pin = USB_INT_PHY0_DM_GPIO_NUM;
327327
if (!perimanSetPinBus(pin, ESP32_BUS_TYPE_USB_DM, (void *)this, -1, -1)) {
328328
goto err;
329329
}
330-
pin = USB_DP_GPIO_NUM;
330+
pin = USB_INT_PHY0_DP_GPIO_NUM;
331331
if (!perimanSetPinBus(pin, ESP32_BUS_TYPE_USB_DP, (void *)this, -1, -1)) {
332332
goto err;
333333
}

Diff for: cores/esp32/HardwareSerial.cpp

+12-12
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,23 @@
2626
void serialEvent(void) __attribute__((weak));
2727
void serialEvent(void) {}
2828

29-
#if SOC_UART_NUM > 1
29+
#if SOC_UART_HP_NUM > 1
3030
void serialEvent1(void) __attribute__((weak));
3131
void serialEvent1(void) {}
32-
#endif /* SOC_UART_NUM > 1 */
32+
#endif /* SOC_UART_HP_NUM > 1 */
3333

34-
#if SOC_UART_NUM > 2
34+
#if SOC_UART_HP_NUM > 2
3535
void serialEvent2(void) __attribute__((weak));
3636
void serialEvent2(void) {}
37-
#endif /* SOC_UART_NUM > 2 */
37+
#endif /* SOC_UART_HP_NUM > 2 */
3838

3939
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SERIAL)
4040
// There is always Seria0 for UART0
4141
HardwareSerial Serial0(0);
42-
#if SOC_UART_NUM > 1
42+
#if SOC_UART_HP_NUM > 1
4343
HardwareSerial Serial1(1);
4444
#endif
45-
#if SOC_UART_NUM > 2
45+
#if SOC_UART_HP_NUM > 2
4646
HardwareSerial Serial2(2);
4747
#endif
4848

@@ -72,12 +72,12 @@ void serialEventRun(void) {
7272
if (Serial0.available()) {
7373
serialEvent();
7474
}
75-
#if SOC_UART_NUM > 1
75+
#if SOC_UART_HP_NUM > 1
7676
if (Serial1.available()) {
7777
serialEvent1();
7878
}
7979
#endif
80-
#if SOC_UART_NUM > 2
80+
#if SOC_UART_HP_NUM > 2
8181
if (Serial2.available()) {
8282
serialEvent2();
8383
}
@@ -279,8 +279,8 @@ void HardwareSerial::_uartEventTask(void *args) {
279279
}
280280

281281
void HardwareSerial::begin(unsigned long baud, uint32_t config, int8_t rxPin, int8_t txPin, bool invert, unsigned long timeout_ms, uint8_t rxfifo_full_thrhd) {
282-
if (_uart_nr >= SOC_UART_NUM) {
283-
log_e("Serial number is invalid, please use a number from 0 to %u", SOC_UART_NUM - 1);
282+
if (_uart_nr >= SOC_UART_HP_NUM) {
283+
log_e("Serial number is invalid, please use a number from 0 to %u", SOC_UART_HP_NUM - 1);
284284
return;
285285
}
286286

@@ -305,7 +305,7 @@ void HardwareSerial::begin(unsigned long baud, uint32_t config, int8_t rxPin, in
305305
txPin = _txPin < 0 ? (int8_t)SOC_TX0 : _txPin;
306306
}
307307
break;
308-
#if SOC_UART_NUM > 1 // may save some flash bytes...
308+
#if SOC_UART_HP_NUM > 1 // may save some flash bytes...
309309
case UART_NUM_1:
310310
if (rxPin < 0 && txPin < 0) {
311311
// do not change RX1/TX1 if it has already been set before
@@ -314,7 +314,7 @@ void HardwareSerial::begin(unsigned long baud, uint32_t config, int8_t rxPin, in
314314
}
315315
break;
316316
#endif
317-
#if SOC_UART_NUM > 2 // may save some flash bytes...
317+
#if SOC_UART_HP_NUM > 2 // may save some flash bytes...
318318
case UART_NUM_2:
319319
if (rxPin < 0 && txPin < 0) {
320320
// do not change RX2/TX2 if it has already been set before

Diff for: cores/esp32/HardwareSerial.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ typedef enum {
146146

147147
// Default pins for UART1 are arbitrary, and defined here for convenience.
148148

149-
#if SOC_UART_NUM > 1
149+
#if SOC_UART_HP_NUM > 1
150150
#ifndef RX1
151151
#if CONFIG_IDF_TARGET_ESP32
152152
#define RX1 (gpio_num_t)26
@@ -182,11 +182,11 @@ typedef enum {
182182
#define TX1 (gpio_num_t)1
183183
#endif
184184
#endif
185-
#endif /* SOC_UART_NUM > 1 */
185+
#endif /* SOC_UART_HP_NUM > 1 */
186186

187187
// Default pins for UART2 are arbitrary, and defined here for convenience.
188188

189-
#if SOC_UART_NUM > 2
189+
#if SOC_UART_HP_NUM > 2
190190
#ifndef RX2
191191
#if CONFIG_IDF_TARGET_ESP32
192192
#define RX2 (gpio_num_t)4
@@ -202,7 +202,7 @@ typedef enum {
202202
#define TX2 (gpio_num_t)20
203203
#endif
204204
#endif
205-
#endif /* SOC_UART_NUM > 2 */
205+
#endif /* SOC_UART_HP_NUM > 2 */
206206

207207
typedef std::function<void(void)> OnReceiveCb;
208208
typedef std::function<void(hardwareSerial_error_t)> OnReceiveErrorCb;
@@ -357,10 +357,10 @@ extern void serialEventRun(void) __attribute__((weak));
357357
#endif // ARDUINO_USB_CDC_ON_BOOT
358358
// There is always Seria0 for UART0
359359
extern HardwareSerial Serial0;
360-
#if SOC_UART_NUM > 1
360+
#if SOC_UART_HP_NUM > 1
361361
extern HardwareSerial Serial1;
362362
#endif
363-
#if SOC_UART_NUM > 2
363+
#if SOC_UART_HP_NUM > 2
364364
extern HardwareSerial Serial2;
365365
#endif
366366
#endif //!defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SERIAL)

Diff for: cores/esp32/esp32-hal-i2c-slave.c

+15-15
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
#define I2C_SLAVE_USE_RX_QUEUE 0 // 1: Queue, 0: RingBuffer
5151

52-
#if SOC_I2C_NUM > 1
52+
#if SOC_HP_I2C_NUM > 1
5353
#define I2C_SCL_IDX(p) ((p == 0) ? I2CEXT0_SCL_OUT_IDX : ((p == 1) ? I2CEXT1_SCL_OUT_IDX : 0))
5454
#define I2C_SDA_IDX(p) ((p == 0) ? I2CEXT0_SDA_OUT_IDX : ((p == 1) ? I2CEXT1_SDA_OUT_IDX : 0))
5555
#else
@@ -99,14 +99,14 @@ typedef union {
9999
uint32_t val;
100100
} i2c_slave_queue_event_t;
101101

102-
static i2c_slave_struct_t _i2c_bus_array[SOC_I2C_NUM] = {
102+
static i2c_slave_struct_t _i2c_bus_array[SOC_HP_I2C_NUM] = {
103103
{&I2C0, 0, -1, -1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0
104104
#if !CONFIG_DISABLE_HAL_LOCKS
105105
,
106106
NULL
107107
#endif
108108
},
109-
#if SOC_I2C_NUM > 1
109+
#if SOC_HP_I2C_NUM > 1
110110
{&I2C1, 1, -1, -1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0
111111
#if !CONFIG_DISABLE_HAL_LOCKS
112112
,
@@ -210,7 +210,7 @@ static bool i2cSlaveDetachBus(void *bus_i2c_num);
210210
//=====================================================================================================================
211211

212212
esp_err_t i2cSlaveAttachCallbacks(uint8_t num, i2c_slave_request_cb_t request_callback, i2c_slave_receive_cb_t receive_callback, void *arg) {
213-
if (num >= SOC_I2C_NUM) {
213+
if (num >= SOC_HP_I2C_NUM) {
214214
log_e("Invalid port num: %u", num);
215215
return ESP_ERR_INVALID_ARG;
216216
}
@@ -224,7 +224,7 @@ esp_err_t i2cSlaveAttachCallbacks(uint8_t num, i2c_slave_request_cb_t request_ca
224224
}
225225

226226
esp_err_t i2cSlaveInit(uint8_t num, int sda, int scl, uint16_t slaveID, uint32_t frequency, size_t rx_len, size_t tx_len) {
227-
if (num >= SOC_I2C_NUM) {
227+
if (num >= SOC_HP_I2C_NUM) {
228228
log_e("Invalid port num: %u", num);
229229
return ESP_ERR_INVALID_ARG;
230230
}
@@ -309,14 +309,14 @@ esp_err_t i2cSlaveInit(uint8_t num, int sda, int scl, uint16_t slaveID, uint32_t
309309

310310
if (i2c->num == 0) {
311311
periph_ll_enable_clk_clear_rst(PERIPH_I2C0_MODULE);
312-
#if SOC_I2C_NUM > 1
312+
#if SOC_HP_I2C_NUM > 1
313313
} else {
314314
periph_ll_enable_clk_clear_rst(PERIPH_I2C1_MODULE);
315315
#endif
316316
}
317317

318318
i2c_ll_slave_init(i2c->dev);
319-
i2c_ll_set_fifo_mode(i2c->dev, true);
319+
i2c_ll_slave_set_fifo_mode(i2c->dev, true);
320320
i2c_ll_set_slave_addr(i2c->dev, slaveID, false);
321321
i2c_ll_set_tout(i2c->dev, I2C_LL_MAX_TIMEOUT);
322322
i2c_slave_set_frequency(i2c, frequency);
@@ -337,13 +337,13 @@ esp_err_t i2cSlaveInit(uint8_t num, int sda, int scl, uint16_t slaveID, uint32_t
337337

338338
i2c_ll_disable_intr_mask(i2c->dev, I2C_LL_INTR_MASK);
339339
i2c_ll_clear_intr_mask(i2c->dev, I2C_LL_INTR_MASK);
340-
i2c_ll_set_fifo_mode(i2c->dev, true);
340+
i2c_ll_slave_set_fifo_mode(i2c->dev, true);
341341

342342
if (!i2c->intr_handle) {
343343
uint32_t flags = ESP_INTR_FLAG_LOWMED | ESP_INTR_FLAG_SHARED;
344344
if (i2c->num == 0) {
345345
ret = esp_intr_alloc(ETS_I2C_EXT0_INTR_SOURCE, flags, &i2c_slave_isr_handler, i2c, &i2c->intr_handle);
346-
#if SOC_I2C_NUM > 1
346+
#if SOC_HP_I2C_NUM > 1
347347
} else {
348348
ret = esp_intr_alloc(ETS_I2C_EXT1_INTR_SOURCE, flags, &i2c_slave_isr_handler, i2c, &i2c->intr_handle);
349349
#endif
@@ -375,7 +375,7 @@ esp_err_t i2cSlaveInit(uint8_t num, int sda, int scl, uint16_t slaveID, uint32_t
375375
}
376376

377377
esp_err_t i2cSlaveDeinit(uint8_t num) {
378-
if (num >= SOC_I2C_NUM) {
378+
if (num >= SOC_HP_I2C_NUM) {
379379
log_e("Invalid port num: %u", num);
380380
return ESP_ERR_INVALID_ARG;
381381
}
@@ -398,7 +398,7 @@ esp_err_t i2cSlaveDeinit(uint8_t num) {
398398
}
399399

400400
size_t i2cSlaveWrite(uint8_t num, const uint8_t *buf, uint32_t len, uint32_t timeout_ms) {
401-
if (num >= SOC_I2C_NUM) {
401+
if (num >= SOC_HP_I2C_NUM) {
402402
log_e("Invalid port num: %u", num);
403403
return 0;
404404
}
@@ -515,16 +515,16 @@ static bool i2c_slave_set_frequency(i2c_slave_struct_t *i2c, uint32_t clk_speed)
515515

516516
i2c_hal_clk_config_t clk_cal;
517517
#if SOC_I2C_SUPPORT_APB
518-
i2c_ll_cal_bus_clk(APB_CLK_FREQ, clk_speed, &clk_cal);
518+
i2c_ll_master_cal_bus_clk(APB_CLK_FREQ, clk_speed, &clk_cal);
519519
i2c_ll_set_source_clk(i2c->dev, SOC_MOD_CLK_APB); /*!< I2C source clock from APB, 80M*/
520520
#elif SOC_I2C_SUPPORT_XTAL
521-
i2c_ll_cal_bus_clk(XTAL_CLK_FREQ, clk_speed, &clk_cal);
521+
i2c_ll_master_cal_bus_clk(XTAL_CLK_FREQ, clk_speed, &clk_cal);
522522
i2c_ll_set_source_clk(i2c->dev, SOC_MOD_CLK_XTAL); /*!< I2C source clock from XTAL, 40M */
523523
#endif
524524
i2c_ll_set_txfifo_empty_thr(i2c->dev, a);
525525
i2c_ll_set_rxfifo_full_thr(i2c->dev, SOC_I2C_FIFO_LEN - a);
526-
i2c_ll_set_bus_timing(i2c->dev, &clk_cal);
527-
i2c_ll_set_filter(i2c->dev, 3);
526+
i2c_ll_master_set_bus_timing(i2c->dev, &clk_cal);
527+
i2c_ll_master_set_filter(i2c->dev, 3);
528528
return true;
529529
}
530530

0 commit comments

Comments
 (0)