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

Add methods to use semaphore from ISR #52

Merged
merged 1 commit into from
Mar 21, 2023

Conversation

agerasev
Copy link
Contributor

@agerasev agerasev commented Mar 8, 2023

There already are shim functions for that, but they were not used in Rust library.

@@ -38,6 +38,15 @@ extern "C" {
pub fn freertos_rs_give_mutex(mutex: FreeRtosQueueHandle) -> FreeRtosBaseType;
pub fn freertos_rs_give_recursive_mutex(mutex: FreeRtosQueueHandle) -> FreeRtosBaseType;

pub fn freertos_rs_take_semaphore_isr(
semaphore: FreeRtosQueueHandle,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the other semaphore functions take and emit QueueHandle but that looks wrong to me. The underlying type is the same, so it works, but I think it should be FreeRtosSemaphoreHandle. Changing this might be more than you wanted to do here so I'm happy to move that rework to a separate PR.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added issue as #54 54

@schteve
Copy link
Collaborator

schteve commented Mar 21, 2023

Thanks!

@schteve schteve merged commit 21bf3be into lobaro:master Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants