-
Notifications
You must be signed in to change notification settings - Fork 79
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
[RFC] Support both Layers as const-array and as slices #96
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,10 @@ | |
#![no_std] | ||
#![deny(missing_docs)] | ||
|
||
#[cfg(test)] | ||
#[macro_use] | ||
extern crate alloc; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do you need this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, I think I don't. I must have put it there when testing something (maybe using |
||
|
||
use usb_device::bus::UsbBusAllocator; | ||
use usb_device::prelude::*; | ||
|
||
|
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.
Maybe some coord type would improve code readability and remove col/row missmatches.
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.
You mean something like
struct Coords { row: u8, col: u8 }
(as(u8, u8)
andstruct Coords(u8, u8)
don't solve the problem)? Or maybe some wrapper types similar to stm32f0xx_hal::time::Hertz, likestruct Row(u8)
,struct Col(u8)
?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.
I mean
struct Coord { i: u8, j: u8 }
but that's a refactor that might be out of scope of this PR.