pub fn new(sel: R) -> Option<Self> {
		if sel.count_ones() != 1 {
			return None;
		}
		Some(unsafe { Self::new_unchecked(sel) })
	}
/// Wraps a selector value as a known-good selection in an `R` register.
///
/// ## Parameters
///
/// - `sel`: A one-hot selection mask of a bit in an `R` register.
///
/// ## Returns
///
/// This returns `Some(sel)` when it is a power of two (exactly one bit set
/// and all others cleared), and `None` when it is not.
Wraps a selector value as a known-good selection in an `R` register.
Wraps a selector value as a known - good selection in an ` R ` register .
pub fn new(sel: R) -> Option<Self> {
		if sel.count_ones() != 1 {
			return None;
		}
		Some(unsafe { Self::new_unchecked(sel) })
	}
pub fn new ( sel : R ) -> Option < Self > { if sel . count_ones ( ) != 1 { return None ; } Some ( unsafe { Self :: new_unchecked ( sel ) } ) }
Wraps a selector value as a known-good selection in an `R` register.
Wraps a selector value as a known - good selection in an ` R ` register .
sel
R
This returns `Some(sel)` when it is a power of two (exactly one bit set
and all others cleared), and `None` when it is not.
This returns ` Some ( sel ) ` when it is a power of two ( exactly one bit set and all others cleared ) and ` None ` when it is not .
sel
R
A one-hot selection mask of a bit in an `R` register.
A one - hot selection mask of a bit in an ` R ` register .