@@ -279,7 +279,7 @@ pub mod raw {
279279 /// Creates a new instance of the reader.
280280 #[ allow( unused) ]
281281 #[ inline( always) ]
282- pub ( crate ) fn new ( bits : FI :: Ux ) -> Self {
282+ pub ( crate ) const fn new ( bits : FI :: Ux ) -> Self {
283283 Self {
284284 bits,
285285 _reg : marker:: PhantomData ,
@@ -296,7 +296,7 @@ pub mod raw {
296296 /// Creates a new instance of the reader.
297297 #[ allow( unused) ]
298298 #[ inline( always) ]
299- pub ( crate ) fn new ( bits : bool ) -> Self {
299+ pub ( crate ) const fn new ( bits : bool ) -> Self {
300300 Self {
301301 bits,
302302 _reg : marker:: PhantomData ,
@@ -364,7 +364,7 @@ pub type R<REG> = raw::R<REG>;
364364impl < REG : RegisterSpec > R < REG > {
365365 /// Reads raw bits from register.
366366 #[ inline( always) ]
367- pub fn bits ( & self ) -> REG :: Ux {
367+ pub const fn bits ( & self ) -> REG :: Ux {
368368 self . bits
369369 }
370370}
@@ -397,7 +397,7 @@ pub type BitReader<FI = bool> = raw::BitReader<FI>;
397397impl < FI : FieldSpec > FieldReader < FI > {
398398 /// Reads raw bits from field.
399399 #[ inline( always) ]
400- pub fn bits ( & self ) -> FI :: Ux {
400+ pub const fn bits ( & self ) -> FI :: Ux {
401401 self . bits
402402 }
403403}
@@ -426,7 +426,7 @@ where
426426impl < FI > BitReader < FI > {
427427 /// Value of the field as raw bits.
428428 #[ inline( always) ]
429- pub fn bit ( & self ) -> bool {
429+ pub const fn bit ( & self ) -> bool {
430430 self . bits
431431 }
432432 /// Returns `true` if the bit is clear (0).
0 commit comments