diff --git a/components/bt/common/osi/thread.c b/components/bt/common/osi/thread.c index c26fc998c2..773f684f16 100644 --- a/components/bt/common/osi/thread.c +++ b/components/bt/common/osi/thread.c @@ -24,7 +24,7 @@ #include "osi/thread.h" struct osi_thread { - void *thread_handle; /*!< Store the thread object */ + TaskHandle_t thread_handle; /*!< Store the thread object */ int thread_id; /*!< May for some OS, such as Linux */ bool stop; uint8_t work_queue_num; /*!< Work queue number */ diff --git a/components/esp_event/host_test/fixtures.hpp b/components/esp_event/host_test/fixtures.hpp index 1a8c4ed7b8..0ae8ef4780 100644 --- a/components/esp_event/host_test/fixtures.hpp +++ b/components/esp_event/host_test/fixtures.hpp @@ -123,7 +123,7 @@ struct MockMutex : public CMockFix { }; struct MockTask : public CMockFix { - MockTask (CreateAnd flags) : task((void*) 1) + MockTask (CreateAnd flags) : task((TaskHandle_t) 1) { if (flags == CreateAnd::FAIL) { xTaskCreatePinnedToCore_ExpectAnyArgsAndReturn(pdFALSE); diff --git a/components/freertos/FreeRTOS-Kernel/include/freertos/event_groups.h b/components/freertos/FreeRTOS-Kernel/include/freertos/event_groups.h index 9792296e56..94f78d6436 100644 --- a/components/freertos/FreeRTOS-Kernel/include/freertos/event_groups.h +++ b/components/freertos/FreeRTOS-Kernel/include/freertos/event_groups.h @@ -84,11 +84,8 @@ * \ingroup EventGroup */ struct EventGroupDef_t; -#ifdef ESP_PLATFORM // IDF-3770 -typedef void * EventGroupHandle_t; -#else -typedef struct EventGroupDef_t * EventGroupHandle_t; -#endif // ESP_PLATFORM +typedef struct EventGroupDef_t * EventGroupHandle_t; + /* * The type that holds event bits always matches TickType_t - therefore the * number of bits it holds is set by configUSE_16_BIT_TICKS (16 bits if set to 1, diff --git a/components/freertos/FreeRTOS-Kernel/include/freertos/task.h b/components/freertos/FreeRTOS-Kernel/include/freertos/task.h index 125a924d06..5e4aced193 100644 --- a/components/freertos/FreeRTOS-Kernel/include/freertos/task.h +++ b/components/freertos/FreeRTOS-Kernel/include/freertos/task.h @@ -82,12 +82,9 @@ * \ingroup Tasks */ struct tskTaskControlBlock; /* The old naming convention is used to prevent breaking kernel aware debuggers. */ -#ifdef ESP_PLATFORM // IDF-3769 -typedef void* TaskHandle_t; -#else -typedef struct tskTaskControlBlock* TaskHandle_t; -#endif // ESP_PLATFORM -/** +typedef struct tskTaskControlBlock * TaskHandle_t; + +/* * Defines the prototype to which the application task hook function must * conform. */ diff --git a/components/freertos/FreeRTOS-Kernel/include/freertos/timers.h b/components/freertos/FreeRTOS-Kernel/include/freertos/timers.h index af6dcb2350..324a618306 100644 --- a/components/freertos/FreeRTOS-Kernel/include/freertos/timers.h +++ b/components/freertos/FreeRTOS-Kernel/include/freertos/timers.h @@ -75,11 +75,8 @@ * (for example, xTimerStart(), xTimerReset(), etc.). */ struct tmrTimerControl; /* The old naming convention is used to prevent breaking kernel aware debuggers. */ -#ifdef ESP_PLATFORM // IDF-3768 -typedef void* TimerHandle_t; -#else typedef struct tmrTimerControl * TimerHandle_t; -#endif // ESP_PLATFORM + /* * Defines the prototype to which timer callback functions must conform. */ diff --git a/components/freertos/FreeRTOS-Kernel/tasks.c b/components/freertos/FreeRTOS-Kernel/tasks.c index 24eb47b948..de1e80feb9 100644 --- a/components/freertos/FreeRTOS-Kernel/tasks.c +++ b/components/freertos/FreeRTOS-Kernel/tasks.c @@ -5315,7 +5315,7 @@ TickType_t uxTaskResetEventItemValue( void ) #if ( configUSE_MUTEXES == 1 ) - void *pvTaskIncrementMutexHeldCount( void ) + TaskHandle_t pvTaskIncrementMutexHeldCount( void ) { TCB_t * curTCB; diff --git a/components/freertos/test/test_task_suspend_resume.c b/components/freertos/test/test_task_suspend_resume.c index 3d880bf05d..2d6f12fa3a 100644 --- a/components/freertos/test/test_task_suspend_resume.c +++ b/components/freertos/test/test_task_suspend_resume.c @@ -361,7 +361,7 @@ TEST_CASE("Test suspend-resume CPU. The number of tick_hook should be the same f static int duration_timer_ms; -static void timer_callback(void *arg) +static void timer_callback(TimerHandle_t arg) { duration_timer_ms += portTICK_PERIOD_MS; } diff --git a/examples/bluetooth/bluedroid/classic_bt/a2dp_source/main/main.c b/examples/bluetooth/bluedroid/classic_bt/a2dp_source/main/main.c index 28d197c2a7..321691f8c9 100644 --- a/examples/bluetooth/bluedroid/classic_bt/a2dp_source/main/main.c +++ b/examples/bluetooth/bluedroid/classic_bt/a2dp_source/main/main.c @@ -71,7 +71,7 @@ static int32_t bt_app_a2d_data_cb(uint8_t *data, int32_t len); /// callback function for AVRCP controller static void bt_app_rc_ct_cb(esp_avrc_ct_cb_event_t event, esp_avrc_ct_cb_param_t *param); -static void a2d_app_heart_beat(void *arg); +static void a2d_app_heart_beat(TimerHandle_t arg); /// A2DP application state machine static void bt_app_av_sm_hdlr(uint16_t event, void *param); @@ -394,7 +394,7 @@ static int32_t bt_app_a2d_data_cb(uint8_t *data, int32_t len) return len; } -static void a2d_app_heart_beat(void *arg) +static void a2d_app_heart_beat(TimerHandle_t arg) { bt_app_work_dispatch(bt_app_av_sm_hdlr, BT_APP_HEART_BEAT_EVT, NULL, 0, NULL); } diff --git a/examples/bluetooth/esp_ble_mesh/common_components/light_driver/light_driver.c b/examples/bluetooth/esp_ble_mesh/common_components/light_driver/light_driver.c index 6fd4954f5e..53ab76ba26 100644 --- a/examples/bluetooth/esp_ble_mesh/common_components/light_driver/light_driver.c +++ b/examples/bluetooth/esp_ble_mesh/common_components/light_driver/light_driver.c @@ -1,16 +1,8 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #include #include @@ -746,7 +738,7 @@ static void light_fade_timer_stop(void) g_fade_timer = NULL; } -static void light_fade_timer_cb(void *timer) +static void light_fade_timer_cb(TimerHandle_t timer) { uint8_t red = 0; uint8_t green = 0; diff --git a/examples/cxx/experimental/esp_modem_cxx/main/idf_component.yml b/examples/cxx/experimental/esp_modem_cxx/main/idf_component.yml index 3807634297..9a44e61be5 100644 --- a/examples/cxx/experimental/esp_modem_cxx/main/idf_component.yml +++ b/examples/cxx/experimental/esp_modem_cxx/main/idf_component.yml @@ -4,4 +4,4 @@ targets: description: cmux example of esp_modem dependencies: espressif/esp_modem: - version: "0.1.9" + version: "0.1.12" diff --git a/tools/ci/check_copyright_ignore.txt b/tools/ci/check_copyright_ignore.txt index f9120d9d0a..721fb2791e 100644 --- a/tools/ci/check_copyright_ignore.txt +++ b/tools/ci/check_copyright_ignore.txt @@ -2870,7 +2870,6 @@ examples/bluetooth/esp_ble_mesh/common_components/fast_provisioning/ble_mesh_fas examples/bluetooth/esp_ble_mesh/common_components/light_driver/include/iot_led.h examples/bluetooth/esp_ble_mesh/common_components/light_driver/include/iot_light.h examples/bluetooth/esp_ble_mesh/common_components/light_driver/include/light_driver.h -examples/bluetooth/esp_ble_mesh/common_components/light_driver/light_driver.c examples/bluetooth/esp_hid_device/main/esp_hid_device_main.c examples/bluetooth/esp_hid_device/main/esp_hid_gap.c examples/bluetooth/esp_hid_device/main/esp_hid_gap.h