From 17a688749a956f1108d746c03b42aeafa11e3c63 Mon Sep 17 00:00:00 2001 From: morris Date: Mon, 30 May 2022 10:49:39 +0800 Subject: [PATCH] timer: disable nano printf for gptimer examples because we need to use %llu to print the timer count value, but nano printf doesn't known that format --- components/driver/test_apps/gptimer/README.md | 4 ++-- components/driver/test_apps/legacy_timer_driver/README.md | 4 ++-- examples/peripherals/timer_group/gptimer/README.md | 3 +++ examples/peripherals/timer_group/gptimer/sdkconfig.defaults | 6 ++++++ examples/peripherals/timer_group/legacy_driver/README.md | 3 +++ .../timer_group/legacy_driver/sdkconfig.defaults | 3 +++ 6 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 examples/peripherals/timer_group/gptimer/sdkconfig.defaults diff --git a/components/driver/test_apps/gptimer/README.md b/components/driver/test_apps/gptimer/README.md index 3f7a0a04f0..57433de18a 100644 --- a/components/driver/test_apps/gptimer/README.md +++ b/components/driver/test_apps/gptimer/README.md @@ -1,2 +1,2 @@ -| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | -| ----------------- | ----- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | diff --git a/components/driver/test_apps/legacy_timer_driver/README.md b/components/driver/test_apps/legacy_timer_driver/README.md index 3f7a0a04f0..57433de18a 100644 --- a/components/driver/test_apps/legacy_timer_driver/README.md +++ b/components/driver/test_apps/legacy_timer_driver/README.md @@ -1,2 +1,2 @@ -| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | -| ----------------- | ----- | -------- | -------- | -------- | +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | diff --git a/examples/peripherals/timer_group/gptimer/README.md b/examples/peripherals/timer_group/gptimer/README.md index 96d071fe58..2b79522473 100644 --- a/examples/peripherals/timer_group/gptimer/README.md +++ b/examples/peripherals/timer_group/gptimer/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | + # Example: General Purpose Timer This example illustrates how to use gptimer APIs to generate periodic alarm events and how different alarm actions behave on events. diff --git a/examples/peripherals/timer_group/gptimer/sdkconfig.defaults b/examples/peripherals/timer_group/gptimer/sdkconfig.defaults new file mode 100644 index 0000000000..82d4960857 --- /dev/null +++ b/examples/peripherals/timer_group/gptimer/sdkconfig.defaults @@ -0,0 +1,6 @@ +# This file was generated using idf.py save-defconfig. It can be edited manually. +# Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration +# + +# Disable nano printf, because we need to print the timer count in %llu format +CONFIG_NEWLIB_NANO_FORMAT=n diff --git a/examples/peripherals/timer_group/legacy_driver/README.md b/examples/peripherals/timer_group/legacy_driver/README.md index 1da4ef74d3..5cd057725a 100644 --- a/examples/peripherals/timer_group/legacy_driver/README.md +++ b/examples/peripherals/timer_group/legacy_driver/README.md @@ -1,3 +1,6 @@ +| Supported Targets | ESP32 | ESP32-S2 | ESP32-S3 | ESP32-C3 | ESP32-C2 | +| ----------------- | ----- | -------- | -------- | -------- | -------- | + # Example: General Purpose Timer This example uses the timer group driver to generate timer interrupts at two specified alarm intervals. diff --git a/examples/peripherals/timer_group/legacy_driver/sdkconfig.defaults b/examples/peripherals/timer_group/legacy_driver/sdkconfig.defaults index 57b9e914f0..03820fcd3c 100644 --- a/examples/peripherals/timer_group/legacy_driver/sdkconfig.defaults +++ b/examples/peripherals/timer_group/legacy_driver/sdkconfig.defaults @@ -2,3 +2,6 @@ # Espressif IoT Development Framework (ESP-IDF) Project Minimal Configuration # CONFIG_GPTIMER_SUPPRESS_DEPRECATE_WARN=y + +# Disable nano printf, because we need to print the timer count in %llu format +CONFIG_NEWLIB_NANO_FORMAT=n