-
Notifications
You must be signed in to change notification settings - Fork 7
The DWM1001 struct can't be created with RTFM (safely) #80
Comments
Oh man, that really sucks! This means that RTFM is incompatible with any crate taking ownership of This is bad, in my opinion, because I think the whole extension trait pattern the other HALs have going on is deeply flawed. I wrote about that earlier. I've been planning to write a more detailed article about this issue. I need to prioritize this. Unless there's some easy way out that I can't see right now, either someone needs to prove me wrong, or RTFM needs to be fixed. Otherwise we'll get to choose between sup-par static guarantees in HAL APIs and a split ecosystem (although, to be honest, I seem to be the only one who's split from the rest of the ecosystem right now :-) ). |
I'm mostly through your stream now. I think your particular problem can be solved, or at least alleviated, by making the constructors of The more general problem I talked about in my previous comment remains. Pretty sure I couldn't do this in |
@jamesmunns, The more specific problem in this library can be solved by the following action items:
|
I'm going to close this. The immediate problem was fixed in #82. The more general problem is being discussed in https://github.com/japaric/cortex-m-rtfm/issues/163. |
Creating the DWM1001 struct requires the use of either
::take()
or::new()
. RTFM takes both the Peripherals and CorePeripherals, and gives the user of RTFM a subset of these items (because it takes things like the SysTick timer).In my template examples, I realized that I never used the DWM1001 struct. I stumbled on this again during a stream - (about 40 minutes in).
I'm not sure the best way to fix this yet, but might take a deeper peek later.
The text was updated successfully, but these errors were encountered: