-
Notifications
You must be signed in to change notification settings - Fork 214
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
esp-println: avoid double locking when using auto #2567
Conversation
57db824
to
2e70468
Compare
@@ -145,27 +145,19 @@ mod auto_printer { | |||
unsafe { (USB_DEVICE_INT_RAW.read_volatile() & SOF_INT_MASK) != 0 } | |||
} | |||
|
|||
pub fn write_bytes_assume_cs(bytes: &[u8]) { | |||
pub fn write_bytes_in_cs(bytes: &[u8], token: LockToken<'_>) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the record: LockToken was introduced explicitly to clean up the double-locking here - by making it obvious that we're already in with
.
Ah damn println doesn't depend on esp-hal :/ |
2e70468
to
cd6f573
Compare
89c0e1b
to
e2cda55
Compare
e2cda55
to
c989022
Compare
It was a deliberate decision to not depend on the HAL in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
No description provided.