freertos: Remove legacy data types

This commit removes the usage of all legacy FreeRTOS data types that
are exposed via configENABLE_BACKWARD_COMPATIBILITY. Legacy types can
still be used by enabling CONFIG_FREERTOS_ENABLE_BACKWARD_COMPATIBILITY.
This commit is contained in:
Darian Leung
2022-02-08 17:39:38 +08:00
parent 5810ed1d04
commit 57fd78f5ba
169 changed files with 635 additions and 706 deletions

View File

@@ -153,13 +153,13 @@ typedef struct {
int intr_alloc_flags; /*!< Used to allocate the interrupt */
StaticQueue_t evt_queue_buffer; /*!< The buffer that will hold the queue structure*/
#endif
xSemaphoreHandle cmd_mux; /*!< semaphore to lock command process */
SemaphoreHandle_t cmd_mux; /*!< semaphore to lock command process */
#ifdef CONFIG_PM_ENABLE
esp_pm_lock_handle_t pm_lock;
#endif
xSemaphoreHandle slv_rx_mux; /*!< slave rx buffer mux */
xSemaphoreHandle slv_tx_mux; /*!< slave tx buffer mux */
SemaphoreHandle_t slv_rx_mux; /*!< slave rx buffer mux */
SemaphoreHandle_t slv_tx_mux; /*!< slave tx buffer mux */
size_t rx_buf_length; /*!< rx buffer length */
RingbufHandle_t rx_ring_buf; /*!< rx ringbuffer handler of slave mode */
size_t tx_buf_length; /*!< tx buffer length */
@@ -1403,7 +1403,7 @@ esp_err_t i2c_master_cmd_begin(i2c_port_t i2c_num, i2c_cmd_handle_t cmd_handle,
static uint8_t clear_bus_cnt = 0;
esp_err_t ret = ESP_FAIL;
i2c_obj_t *p_i2c = p_i2c_obj[i2c_num];
portTickType ticks_start = xTaskGetTickCount();
TickType_t ticks_start = xTaskGetTickCount();
portBASE_TYPE res = xSemaphoreTake(p_i2c->cmd_mux, ticks_to_wait);
if (res == pdFALSE) {
return ESP_ERR_TIMEOUT;
@@ -1503,7 +1503,7 @@ int i2c_slave_write_buffer(i2c_port_t i2c_num, const uint8_t *data, int size, Ti
portBASE_TYPE res;
int cnt = 0;
portTickType ticks_end = xTaskGetTickCount() + ticks_to_wait;
TickType_t ticks_end = xTaskGetTickCount() + ticks_to_wait;
res = xSemaphoreTake(p_i2c->slv_tx_mux, ticks_to_wait);
if (res == pdFALSE) {
@@ -1536,8 +1536,8 @@ int i2c_slave_read_buffer(i2c_port_t i2c_num, uint8_t *data, size_t max_size, Ti
if (xSemaphoreTake(p_i2c->slv_rx_mux, ticks_to_wait) == pdFALSE) {
return 0;
}
portTickType ticks_rem = ticks_to_wait;
portTickType ticks_end = xTaskGetTickCount() + ticks_to_wait;
TickType_t ticks_rem = ticks_to_wait;
TickType_t ticks_end = xTaskGetTickCount() + ticks_to_wait;
I2C_ENTER_CRITICAL(&(i2c_context[i2c_num].spinlock));
i2c_hal_enable_slave_rx_it(&(i2c_context[i2c_num].hal));
I2C_EXIT_CRITICAL(&(i2c_context[i2c_num].spinlock));