Skip to content

Commit

Permalink
Merge pull request tock#4099 from inesmaria08/support_for_up_to_64bit…
Browse files Browse the repository at this point in the history
…_buffer

Fix the bus library to support all the possible address widths
  • Loading branch information
lschuermann authored Oct 13, 2024
2 parents 10f7d59 + 9ac4749 commit f30976d
Show file tree
Hide file tree
Showing 5 changed files with 248 additions and 90 deletions.
18 changes: 12 additions & 6 deletions boards/components/src/st77xx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
//! ```

use capsules_core::virtualizers::virtual_alarm::{MuxAlarm, VirtualMuxAlarm};
use capsules_extra::bus;
use capsules_extra::bus::{self, BusAddr8};
use capsules_extra::st77xx::{ST77XXScreen, ST77XX};
use core::mem::MaybeUninit;
use kernel::component::Component;
Expand Down Expand Up @@ -72,7 +72,7 @@ macro_rules! st77xx_component_static {

pub struct ST77XXComponent<
A: 'static + time::Alarm<'static>,
B: 'static + bus::Bus<'static>,
B: 'static + bus::Bus<'static, BusAddr8>,
P: 'static + gpio::Pin,
> {
alarm_mux: &'static MuxAlarm<'static, A>,
Expand All @@ -82,8 +82,11 @@ pub struct ST77XXComponent<
screen: &'static ST77XXScreen,
}

impl<A: 'static + time::Alarm<'static>, B: 'static + bus::Bus<'static>, P: 'static + gpio::Pin>
ST77XXComponent<A, B, P>
impl<
A: 'static + time::Alarm<'static>,
B: 'static + bus::Bus<'static, BusAddr8>,
P: 'static + gpio::Pin,
> ST77XXComponent<A, B, P>
{
pub fn new(
alarm_mux: &'static MuxAlarm<'static, A>,
Expand All @@ -102,8 +105,11 @@ impl<A: 'static + time::Alarm<'static>, B: 'static + bus::Bus<'static>, P: 'stat
}
}

impl<A: 'static + time::Alarm<'static>, B: 'static + bus::Bus<'static>, P: 'static + gpio::Pin>
Component for ST77XXComponent<A, B, P>
impl<
A: 'static + time::Alarm<'static>,
B: 'static + bus::Bus<'static, BusAddr8>,
P: 'static + gpio::Pin,
> Component for ST77XXComponent<A, B, P>
{
type StaticInput = (
&'static mut MaybeUninit<VirtualMuxAlarm<'static, A>>,
Expand Down
Loading

0 comments on commit f30976d

Please sign in to comment.