Skip to content

Commit 4a12dba

Browse files
authored
Updated FreeRTOS names (#8418)
1 parent 431bf8b commit 4a12dba

File tree

21 files changed

+41
-41
lines changed

21 files changed

+41
-41
lines changed

cores/esp32/HWCDC.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
ESP_EVENT_DEFINE_BASE(ARDUINO_HW_CDC_EVENTS);
3333

3434
static RingbufHandle_t tx_ring_buf = NULL;
35-
static xQueueHandle rx_queue = NULL;
35+
static QueueHandle_t rx_queue = NULL;
3636
static uint8_t rx_data_buf[64] = {0};
3737
static intr_handle_t intr_handle = NULL;
3838
static volatile bool initial_empty = false;
39-
static xSemaphoreHandle tx_lock = NULL;
39+
static SemaphoreHandle_t tx_lock = NULL;
4040

4141
// workaround for when USB CDC is not connected
4242
static uint32_t tx_timeout_ms = 0;

cores/esp32/HardwareSerial.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ void HardwareSerial::_uartEventTask(void *args)
298298
if (uartEventQueue != NULL) {
299299
for(;;) {
300300
//Waiting for UART event.
301-
if(xQueueReceive(uartEventQueue, (void * )&event, (portTickType)portMAX_DELAY)) {
301+
if(xQueueReceive(uartEventQueue, (void * )&event, (TickType_t)portMAX_DELAY)) {
302302
hardwareSerial_error_t currentErr = UART_NO_ERROR;
303303
switch(event.type) {
304304
case UART_DATA:

cores/esp32/USBCDC.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ size_t USBCDC::setRxBufferSize(size_t rx_queue_len){
123123
uxQueueSpacesAvailable(rx_queue) + uxQueueMessagesWaiting(rx_queue) : 0;
124124

125125
if (rx_queue_len != currentQueueSize) {
126-
xQueueHandle new_rx_queue = NULL;
126+
QueueHandle_t new_rx_queue = NULL;
127127
if (rx_queue_len) {
128128
new_rx_queue = xQueueCreate(rx_queue_len, sizeof(uint8_t));
129129
if(!new_rx_queue){

cores/esp32/USBCDC.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ class USBCDC: public Stream
135135
bool rts;
136136
bool connected;
137137
bool reboot_enable;
138-
xQueueHandle rx_queue;
139-
xSemaphoreHandle tx_lock;
138+
QueueHandle_t rx_queue;
139+
SemaphoreHandle_t tx_lock;
140140
uint32_t tx_timeout_ms;
141141

142142
};

cores/esp32/esp32-hal-cpu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ typedef struct apb_change_cb_s {
6060

6161

6262
static apb_change_t * apb_change_callbacks = NULL;
63-
static xSemaphoreHandle apb_change_lock = NULL;
63+
static SemaphoreHandle_t apb_change_lock = NULL;
6464

6565
static void initApbChangeCallback(){
6666
static volatile bool initialized = false;

cores/esp32/esp32-hal-i2c-slave.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,16 @@ typedef struct i2c_slave_struct_t {
7676
void * arg;
7777
intr_handle_t intr_handle;
7878
TaskHandle_t task_handle;
79-
xQueueHandle event_queue;
79+
QueueHandle_t event_queue;
8080
#if I2C_SLAVE_USE_RX_QUEUE
81-
xQueueHandle rx_queue;
81+
QueueHandle_t rx_queue;
8282
#else
8383
RingbufHandle_t rx_ring_buf;
8484
#endif
85-
xQueueHandle tx_queue;
85+
QueueHandle_t tx_queue;
8686
uint32_t rx_data_count;
8787
#if !CONFIG_DISABLE_HAL_LOCKS
88-
xSemaphoreHandle lock;
88+
SemaphoreHandle_t lock;
8989
#endif
9090
} i2c_slave_struct_t;
9191

@@ -431,7 +431,7 @@ size_t i2cSlaveWrite(uint8_t num, const uint8_t *buf, uint32_t len, uint32_t tim
431431
to_queue = len;
432432
}
433433
for (size_t i = 0; i < to_queue; i++) {
434-
if (xQueueSend(i2c->tx_queue, &buf[i], timeout_ms / portTICK_RATE_MS) != pdTRUE) {
434+
if (xQueueSend(i2c->tx_queue, &buf[i], timeout_ms / portTICK_PERIOD_MS) != pdTRUE) {
435435
xQueueReset(i2c->tx_queue);
436436
to_queue = 0;
437437
break;

cores/esp32/esp32-hal-i2c.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ esp_err_t i2cWrite(uint8_t i2c_num, uint16_t address, const uint8_t* buff, size_
184184
}
185185

186186
//short implementation does not support zero size writes (example when scanning) PR in IDF?
187-
//ret = i2c_master_write_to_device((i2c_port_t)i2c_num, address, buff, size, timeOutMillis / portTICK_RATE_MS);
187+
//ret = i2c_master_write_to_device((i2c_port_t)i2c_num, address, buff, size, timeOutMillis / portTICK_PERIOD_MS);
188188

189189
ret = ESP_OK;
190190
uint8_t cmd_buff[I2C_LINK_RECOMMENDED_SIZE(1)] = { 0 };
@@ -207,7 +207,7 @@ esp_err_t i2cWrite(uint8_t i2c_num, uint16_t address, const uint8_t* buff, size_
207207
if (ret != ESP_OK) {
208208
goto end;
209209
}
210-
ret = i2c_master_cmd_begin((i2c_port_t)i2c_num, cmd, timeOutMillis / portTICK_RATE_MS);
210+
ret = i2c_master_cmd_begin((i2c_port_t)i2c_num, cmd, timeOutMillis / portTICK_PERIOD_MS);
211211

212212
end:
213213
if(cmd != NULL){
@@ -235,7 +235,7 @@ esp_err_t i2cRead(uint8_t i2c_num, uint16_t address, uint8_t* buff, size_t size,
235235
if(!bus[i2c_num].initialized){
236236
log_e("bus is not initialized");
237237
} else {
238-
ret = i2c_master_read_from_device((i2c_port_t)i2c_num, address, buff, size, timeOutMillis / portTICK_RATE_MS);
238+
ret = i2c_master_read_from_device((i2c_port_t)i2c_num, address, buff, size, timeOutMillis / portTICK_PERIOD_MS);
239239
if(ret == ESP_OK){
240240
*readCount = size;
241241
} else {
@@ -264,7 +264,7 @@ esp_err_t i2cWriteReadNonStop(uint8_t i2c_num, uint16_t address, const uint8_t*
264264
if(!bus[i2c_num].initialized){
265265
log_e("bus is not initialized");
266266
} else {
267-
ret = i2c_master_write_read_device((i2c_port_t)i2c_num, address, wbuff, wsize, rbuff, rsize, timeOutMillis / portTICK_RATE_MS);
267+
ret = i2c_master_write_read_device((i2c_port_t)i2c_num, address, wbuff, wsize, rbuff, rsize, timeOutMillis / portTICK_PERIOD_MS);
268268
if(ret == ESP_OK){
269269
*readCount = rsize;
270270
} else {

cores/esp32/esp32-hal-rmt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ struct rmt_obj_s {
6060
size_t *num_symbols_read; // Pointer to the number of RMT symbol read by IDF RMT RX Done
6161

6262
#if !CONFIG_DISABLE_HAL_LOCKS
63-
xSemaphoreHandle g_rmt_objlocks; // Channel Semaphore Lock
63+
SemaphoreHandle_t g_rmt_objlocks; // Channel Semaphore Lock
6464
#endif /* CONFIG_DISABLE_HAL_LOCKS */
6565
};
6666

@@ -69,7 +69,7 @@ typedef struct rmt_obj_s *rmt_bus_handle_t;
6969
/**
7070
Internal variables used in RMT API
7171
*/
72-
static xSemaphoreHandle g_rmt_block_lock = NULL;
72+
static SemaphoreHandle_t g_rmt_block_lock = NULL;
7373

7474
/**
7575
Internal method (private) declarations

cores/esp32/esp32-hal-spi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
struct spi_struct_t {
6060
spi_dev_t * dev;
6161
#if !CONFIG_DISABLE_HAL_LOCKS
62-
xSemaphoreHandle lock;
62+
SemaphoreHandle_t lock;
6363
#endif
6464
uint8_t num;
6565
int8_t sck;

cores/esp32/esp32-hal-tinyusb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ static void hw_cdc_reset_handler(void *arg) {
406406
usb_serial_jtag_ll_clr_intsts_mask(usbjtag_intr_status);
407407

408408
if (usbjtag_intr_status & USB_SERIAL_JTAG_INTR_BUS_RESET) {
409-
xSemaphoreGiveFromISR((xSemaphoreHandle)arg, &xTaskWoken);
409+
xSemaphoreGiveFromISR((SemaphoreHandle_t)arg, &xTaskWoken);
410410
}
411411

412412
if (xTaskWoken == pdTRUE) {
@@ -441,7 +441,7 @@ static void usb_switch_to_cdc_jtag(){
441441
usb_serial_jtag_ll_clr_intsts_mask(USB_SERIAL_JTAG_LL_INTR_MASK);
442442
usb_serial_jtag_ll_ena_intr_mask(USB_SERIAL_JTAG_INTR_BUS_RESET);
443443
intr_handle_t intr_handle = NULL;
444-
xSemaphoreHandle reset_sem = xSemaphoreCreateBinary();
444+
SemaphoreHandle_t reset_sem = xSemaphoreCreateBinary();
445445
if(reset_sem){
446446
if(esp_intr_alloc(ETS_USB_SERIAL_JTAG_INTR_SOURCE, 0, hw_cdc_reset_handler, reset_sem, &intr_handle) != ESP_OK){
447447
vSemaphoreDelete(reset_sem);

0 commit comments

Comments
 (0)