Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 task done
SuGlider opened this issue Sep 18, 2023 · 1 comment
Assignees
Labels
Peripheral: UART Status: To be implemented Selected for Development Type: Feature request Feature request for Arduino ESP32
Milestone

Comments

@SuGlider
Copy link
Collaborator

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.
@SuGlider SuGlider added the Type: Feature request Feature request for Arduino ESP32 label Sep 18, 2023
@SuGlider SuGlider added this to the 3.0.0 milestone Sep 18, 2023
@SuGlider SuGlider self-assigned this Sep 18, 2023
@SuGlider
Copy link
Collaborator Author

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
Labels
Peripheral: UART Status: To be implemented Selected for Development Type: Feature request Feature request for Arduino ESP32
Projects
Development

No branches or pull requests

1 participant