Move frame allocation to two global functions, locking happens inside them

This commit is contained in:
Jeremy Soller 2016-08-17 16:26:43 -06:00
parent ebf9766ef5
commit 78432b3875
11 changed files with 97 additions and 140 deletions

View file

@ -11,7 +11,7 @@ pub struct Pio<T> {
impl<T> Pio<T> {
/// Create a PIO from a given port
pub fn new(port: u16) -> Self {
pub const fn new(port: u16) -> Self {
Pio::<T> {
port: port,
value: PhantomData,