Skip to content

Commit c0dee8a

Browse files
committed
feat(rt): add macro internal constructor for D1 pad
Signed-off-by: Zhouqi Jiang <[email protected]>
1 parent dec52a3 commit c0dee8a

File tree

1 file changed

+9
-0
lines changed
  • allwinner-rt/src/soc

1 file changed

+9
-0
lines changed

allwinner-rt/src/soc/d1.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,15 @@ pub struct Pad<const P: char, const N: u8> {
5959
_private: (),
6060
}
6161

62+
impl<const P: char, const N: u8> Pad<P, N> {
63+
/// Macro internal constructor.
64+
#[doc(hidden)]
65+
#[inline]
66+
pub const fn __new() -> Self {
67+
Self { _private: () }
68+
}
69+
}
70+
6271
impl<'a, const P: char, const N: u8> allwinner_hal::gpio::PadExt<'a, P, N> for &'a mut Pad<P, N> {
6372
#[inline]
6473
fn into_input(self) -> allwinner_hal::gpio::Input<'a> {

0 commit comments

Comments
 (0)