freertos: update module handles to struct type

This commit updates the handles for the timer, task and event_group
modules to struct type. This matches upstream freertos source.

Signed-off-by: Sudeep Mohanty <sudeep.mohanty@espressif.com>
pull/8036/head
Sudeep Mohanty 2021-11-02 10:24:30 +05:30
rodzic ae9f42383c
commit 40c1f3e06e
11 zmienionych plików z 19 dodań i 37 usunięć

Wyświetl plik

@ -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 */

Wyświetl plik

@ -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);

Wyświetl plik

@ -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,

Wyświetl plik

@ -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.
*/

Wyświetl plik

@ -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.
*/

Wyświetl plik

@ -5315,7 +5315,7 @@ TickType_t uxTaskResetEventItemValue( void )
#if ( configUSE_MUTEXES == 1 )
void *pvTaskIncrementMutexHeldCount( void )
TaskHandle_t pvTaskIncrementMutexHeldCount( void )
{
TCB_t * curTCB;

Wyświetl plik

@ -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;
}

Wyświetl plik

@ -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);
}

Wyświetl plik

@ -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 <stdio.h>
#include <string.h>
@ -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;

Wyświetl plik

@ -4,4 +4,4 @@ targets:
description: cmux example of esp_modem
dependencies:
espressif/esp_modem:
version: "0.1.9"
version: "0.1.12"

Wyświetl plik

@ -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