From a353e1d2351e01213fe87254025ba44883d7e20f Mon Sep 17 00:00:00 2001 From: weitianhua Date: Mon, 22 Jun 2020 18:01:47 +0800 Subject: [PATCH] Fix tsk watchdog when running spp vfs demo --- .../bt_spp_vfs_acceptor/main/example_spp_vfs_acceptor_demo.c | 3 +++ .../bt_spp_vfs_initiator/main/example_spp_vfs_initiator_demo.c | 3 +++ 2 files changed, 6 insertions(+) diff --git a/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_acceptor/main/example_spp_vfs_acceptor_demo.c b/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_acceptor/main/example_spp_vfs_acceptor_demo.c index a24d691ecf..2c6b75af1a 100644 --- a/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_acceptor/main/example_spp_vfs_acceptor_demo.c +++ b/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_acceptor/main/example_spp_vfs_acceptor_demo.c @@ -53,6 +53,9 @@ static void spp_read_handle(void * param) int size = 0; int fd = (int)param; do { + /* controll the log frequency, retry after 1s */ + vTaskDelay(1000 / portTICK_PERIOD_MS); + size = read (fd, spp_data, SPP_DATA_LEN); ESP_LOGI(SPP_TAG, "fd = %d data_len = %d", fd, size); if (size == -1) { diff --git a/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_initiator/main/example_spp_vfs_initiator_demo.c b/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_initiator/main/example_spp_vfs_initiator_demo.c index ea8e79987c..8f71d5739d 100644 --- a/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_initiator/main/example_spp_vfs_initiator_demo.c +++ b/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_initiator/main/example_spp_vfs_initiator_demo.c @@ -61,6 +61,9 @@ static void spp_write_handle(void * param) int fd = (int)param; printf("%s %d %p\n", __func__,fd,param); do { + /*Controll the log frequency, retry after 1s*/ + vTaskDelay(1000 / portTICK_PERIOD_MS); + size = write (fd, spp_data, SPP_DATA_LEN); ESP_LOGI(SPP_TAG, "fd = %d data_len = %d",fd, size); if (size == -1) {