Skip to content

Change UART Lock (mutual exclusion code session) to use UART Number instead of UART Struct Pointer #8647

Closed
@SuGlider

Description

@SuGlider

Related area

UART

Hardware specification

Any

Is your feature request related to a problem?

Change the Lock code session in UART HAL to use UART Number instead of using *uart_t.
This change will help to support Multi Taskinng while still being able to lock routine such as pinSet(), detach() or end()

Describe the solution you'd like

TBD

Describe alternatives you've considered

No response

Additional context

No response

I have checked existing list of Feature requests and the Contribution Guide

  • I confirm I have checked existing list of Feature requests and Contribution Guide.

Activity

added this to the 3.0.0 milestone on Sep 18, 2023
self-assigned this
on Sep 18, 2023
SuGlider

SuGlider commented on Oct 11, 2023

@SuGlider
CollaboratorAuthor

Fixed in #8719 using a different approach.

#define UART_MUTEX_LOCK()    if(uart->lock != NULL) do {} while (xSemaphoreTake(uart->lock, portMAX_DELAY) != pdPASS)
#define UART_MUTEX_UNLOCK()  if(uart->lock != NULL) xSemaphoreGive(uart->lock)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Change UART Lock (mutual exclusion code session) to use UART Number instead of UART Struct Pointer · Issue #8647 · espressif/arduino-esp32