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 support for AVR #16

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add support for AVR #16

wants to merge 1 commit into from

Conversation

Rahix
Copy link
Owner

@Rahix Rahix commented Aug 24, 2020

No description provided.

Add a bus-manager for sharing between tasks on AVR.

Signed-off-by: Rahix <rahix@rahix.de>
}

// #[cfg(feature = "avr-device")]
// unsafe impl<T: Send> Send for AvrMutex<T> {}
Copy link

Choose a reason for hiding this comment

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

I'm not qualified to review this PR, but there's some dead code here that could probably be removed (unless the AvrMutex is Send of course).

Copy link
Owner Author

Choose a reason for hiding this comment

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

Good question why I commented that out ... I would argure that it is Send as long as we're on an AVR device (which is single core). Interrupts are disabled while the mutex is held so no interrupt could preempt in the meantime and attempt to access the mutex concurrently.

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