Skip to content

Commit

Permalink
feat(spi): add spi to resource group
Browse files Browse the repository at this point in the history
Signed-off-by: HaoboGu <[email protected]>
  • Loading branch information
HaoboGu committed Jun 30, 2024
1 parent ad2d53f commit eeed64d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/spi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ impl<'d> Spi<'d, Blocking> {
) -> Self {
into_ref!(cs, sclk, mosi, miso);

T::add_resource_group(0);

cs.ioc_pad().func_ctl().write(|w| {
w.set_alt_select(cs.alt_num());
});
Expand Down Expand Up @@ -165,6 +167,8 @@ impl<'d> Spi<'d, Blocking> {
) -> Self {
into_ref!(cs, sclk, mosi, miso, d2, d3);

T::add_resource_group(0);

cs.ioc_pad().func_ctl().write(|w| {
w.set_alt_select(cs.alt_num());
});
Expand Down

0 comments on commit eeed64d

Please sign in to comment.