You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current type of the defined bitfields is *mut u8, a pointer type. It is not clear to me how they are supposed to be used like that. I would expect the bitmasks to be used, e.g., as:
unsafe{*UCSRB = TXEN | RXEN | RXCIE;}
That doesn't work with pointers, though. I've found a workaround using core::intrinsics::transmute, casting it to an usize and subsequently cropping the value to an u8. But I really think that it is a bug in this library.
Do you agree? If so, I might take the time to create a PR to fix the issue.
The text was updated successfully, but these errors were encountered:
The current type of the defined bitfields is
*mut u8
, a pointer type. It is not clear to me how they are supposed to be used like that. I would expect the bitmasks to be used, e.g., as:That doesn't work with pointers, though. I've found a workaround using
core::intrinsics::transmute
, casting it to anusize
and subsequently cropping the value to anu8
. But I really think that it is a bug in this library.Do you agree? If so, I might take the time to create a PR to fix the issue.
The text was updated successfully, but these errors were encountered: