Skip to content

Commit

Permalink
Merge branch 'bugfix/fix_adc_continuous_pytest_error' into 'release/v…
Browse files Browse the repository at this point in the history
…5.0'

ADC: fix adc continuous pytest error that only get first digit

See merge request espressif/esp-idf!28031
  • Loading branch information
suda-morris committed Dec 22, 2023
2 parents b823435 + a87bc7f commit 2e482b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -126,7 +126,7 @@ void app_main(void)
while (1) {
ret = adc_continuous_read(handle, result, EXAMPLE_READ_LEN, &ret_num, 0);
if (ret == ESP_OK) {
ESP_LOGI("TASK", "ret is %x, ret_num is %"PRIu32, ret, ret_num);
ESP_LOGI("TASK", "ret is %x, ret_num is %"PRIu32" bytes", ret, ret_num);
for (int i = 0; i < ret_num; i += SOC_ADC_DIGI_RESULT_BYTES) {
adc_digi_output_data_t *p = (void*)&result[i];
if (check_valid_data(p)) {
Expand Down
Expand Up @@ -11,6 +11,6 @@
@pytest.mark.esp32c3
@pytest.mark.adc
def test_adc_continuous(dut: Dut) -> None:
res = dut.expect(r'TASK: ret is 0, ret_num is (\d+)')
res = dut.expect(r'TASK: ret is 0, ret_num is (\d+) bytes')
num = res.group(1).decode('utf8')
assert int(num) == 256

0 comments on commit 2e482b8

Please sign in to comment.