@@ -505,13 +505,13 @@ pub mod regs {
505505        } 
506506        #[ doc = "I2S standard selection" ]  
507507        #[ inline( always) ]  
508-         pub  const  fn  i2sstd ( & self )  -> super :: vals:: Isstd  { 
508+         pub  const  fn  i2sstd ( & self )  -> super :: vals:: I2sstd  { 
509509            let  val = ( self . 0  >> 4usize )  &  0x03 ; 
510-             super :: vals:: Isstd :: from_bits ( val as  u8 ) 
510+             super :: vals:: I2sstd :: from_bits ( val as  u8 ) 
511511        } 
512512        #[ doc = "I2S standard selection" ]  
513513        #[ inline( always) ]  
514-         pub  fn  set_i2sstd ( & mut  self ,  val :  super :: vals:: Isstd )  { 
514+         pub  fn  set_i2sstd ( & mut  self ,  val :  super :: vals:: I2sstd )  { 
515515            self . 0  = ( self . 0  &  !( 0x03  << 4usize ) )  | ( ( ( val. to_bits ( )  as  u32 )  &  0x03 )  << 4usize ) ; 
516516        } 
517517        #[ doc = "PCM frame synchronization" ]  
@@ -527,13 +527,13 @@ pub mod regs {
527527        } 
528528        #[ doc = "I2S configuration mode" ]  
529529        #[ inline( always) ]  
530-         pub  const  fn  i2scfg ( & self )  -> super :: vals:: Iscfg  { 
530+         pub  const  fn  i2scfg ( & self )  -> super :: vals:: I2scfg  { 
531531            let  val = ( self . 0  >> 8usize )  &  0x03 ; 
532-             super :: vals:: Iscfg :: from_bits ( val as  u8 ) 
532+             super :: vals:: I2scfg :: from_bits ( val as  u8 ) 
533533        } 
534534        #[ doc = "I2S configuration mode" ]  
535535        #[ inline( always) ]  
536-         pub  fn  set_i2scfg ( & mut  self ,  val :  super :: vals:: Iscfg )  { 
536+         pub  fn  set_i2scfg ( & mut  self ,  val :  super :: vals:: I2scfg )  { 
537537            self . 0  = ( self . 0  &  !( 0x03  << 8usize ) )  | ( ( ( val. to_bits ( )  as  u32 )  &  0x03 )  << 8usize ) ; 
538538        } 
539539        #[ doc = "I2S Enabled" ]  
@@ -549,14 +549,14 @@ pub mod regs {
549549        } 
550550        #[ doc = "I2S mode selection" ]  
551551        #[ inline( always) ]  
552-         pub  const  fn  i2smod ( & self )  -> super :: vals :: Ismod  { 
552+         pub  const  fn  i2smod ( & self )  -> bool  { 
553553            let  val = ( self . 0  >> 11usize )  &  0x01 ; 
554-             super :: vals :: Ismod :: from_bits ( val as   u8 ) 
554+             val !=  0 
555555        } 
556556        #[ doc = "I2S mode selection" ]  
557557        #[ inline( always) ]  
558-         pub  fn  set_i2smod ( & mut  self ,  val :  super :: vals :: Ismod )  { 
559-             self . 0  = ( self . 0  &  !( 0x01  << 11usize ) )  | ( ( ( val. to_bits ( )  as  u32 )  &  0x01 )  << 11usize ) ; 
558+         pub  fn  set_i2smod ( & mut  self ,  val :  bool )  { 
559+             self . 0  = ( self . 0  &  !( 0x01  << 11usize ) )  | ( ( ( val as  u32 )  &  0x01 )  << 11usize ) ; 
560560        } 
561561        #[ doc = "Asynchronous start enable" ]  
562562        #[ inline( always) ]  
@@ -594,7 +594,7 @@ pub mod regs {
594594    #[ cfg( feature = "defmt" ) ]  
595595    impl  defmt:: Format  for  I2scfgr  { 
596596        fn  format ( & self ,  f :  defmt:: Formatter )  { 
597-             defmt ::  write ! ( f ,  "I2scfgr {{ chlen: {:?}, datlen: {:?}, ckpol: {:?}, i2sstd: {:?}, pcmsync: {:?}, i2scfg: {:?}, i2se: {=bool:?}, i2smod: {:?}, astrten: {=bool:?} }}"  ,  self  .  chlen ( )  ,  self  .  datlen ( )  ,  self  .  ckpol ( )  ,  self  .  i2sstd ( )  ,  self  .  pcmsync ( )  ,  self  .  i2scfg ( )  ,  self  .  i2se ( )  ,  self  .  i2smod ( )  ,  self  .  astrten ( ) ) 
597+             defmt ::  write ! ( f ,  "I2scfgr {{ chlen: {:?}, datlen: {:?}, ckpol: {:?}, i2sstd: {:?}, pcmsync: {:?}, i2scfg: {:?}, i2se: {=bool:?}, i2smod: {=bool :?}, astrten: {=bool:?} }}"  ,  self  .  chlen ( )  ,  self  .  datlen ( )  ,  self  .  ckpol ( )  ,  self  .  i2sstd ( )  ,  self  .  pcmsync ( )  ,  self  .  i2scfg ( )  ,  self  .  i2se ( )  ,  self  .  i2smod ( )  ,  self  .  astrten ( ) ) 
598598        } 
599599    } 
600600    #[ doc = "I2S prescaler register" ]  
@@ -1436,7 +1436,7 @@ pub mod vals {
14361436    #[ repr( u8 ) ]  
14371437    #[ derive( Copy ,  Clone ,  Debug ,  Eq ,  PartialEq ,  Ord ,  PartialOrd ) ]  
14381438    #[ cfg_attr( feature = "defmt" ,  derive( defmt:: Format ) ) ]  
1439-     pub  enum  Iscfg  { 
1439+     pub  enum  I2scfg  { 
14401440        #[ doc = "Slave - transmit" ]  
14411441        SLAVE_TX  = 0x0 , 
14421442        #[ doc = "Slave - receive" ]  
@@ -1446,63 +1446,32 @@ pub mod vals {
14461446        #[ doc = "Master - receive" ]  
14471447        MASTER_RX  = 0x03 , 
14481448    } 
1449-     impl  Iscfg  { 
1449+     impl  I2scfg  { 
14501450        #[ inline( always) ]  
1451-         pub  const  fn  from_bits ( val :  u8 )  -> Iscfg  { 
1451+         pub  const  fn  from_bits ( val :  u8 )  -> I2scfg  { 
14521452            unsafe  {  core:: mem:: transmute ( val &  0x03 )  } 
14531453        } 
14541454        #[ inline( always) ]  
14551455        pub  const  fn  to_bits ( self )  -> u8  { 
14561456            unsafe  {  core:: mem:: transmute ( self )  } 
14571457        } 
14581458    } 
1459-     impl  From < u8 >  for  Iscfg  { 
1460-         #[ inline( always) ]  
1461-         fn  from ( val :  u8 )  -> Iscfg  { 
1462-             Iscfg :: from_bits ( val) 
1463-         } 
1464-     } 
1465-     impl  From < Iscfg >  for  u8  { 
1466-         #[ inline( always) ]  
1467-         fn  from ( val :  Iscfg )  -> u8  { 
1468-             Iscfg :: to_bits ( val) 
1469-         } 
1470-     } 
1471-     #[ repr( u8 ) ]  
1472-     #[ derive( Copy ,  Clone ,  Debug ,  Eq ,  PartialEq ,  Ord ,  PartialOrd ) ]  
1473-     #[ cfg_attr( feature = "defmt" ,  derive( defmt:: Format ) ) ]  
1474-     pub  enum  Ismod  { 
1475-         #[ doc = "SPI mode is selected" ]  
1476-         SPIMODE  = 0x0 , 
1477-         #[ doc = "I2S mode is selected" ]  
1478-         I2SMODE  = 0x01 , 
1479-     } 
1480-     impl  Ismod  { 
1481-         #[ inline( always) ]  
1482-         pub  const  fn  from_bits ( val :  u8 )  -> Ismod  { 
1483-             unsafe  {  core:: mem:: transmute ( val &  0x01 )  } 
1484-         } 
1485-         #[ inline( always) ]  
1486-         pub  const  fn  to_bits ( self )  -> u8  { 
1487-             unsafe  {  core:: mem:: transmute ( self )  } 
1488-         } 
1489-     } 
1490-     impl  From < u8 >  for  Ismod  { 
1459+     impl  From < u8 >  for  I2scfg  { 
14911460        #[ inline( always) ]  
1492-         fn  from ( val :  u8 )  -> Ismod  { 
1493-             Ismod :: from_bits ( val) 
1461+         fn  from ( val :  u8 )  -> I2scfg  { 
1462+             I2scfg :: from_bits ( val) 
14941463        } 
14951464    } 
1496-     impl  From < Ismod >  for  u8  { 
1465+     impl  From < I2scfg >  for  u8  { 
14971466        #[ inline( always) ]  
1498-         fn  from ( val :  Ismod )  -> u8  { 
1499-             Ismod :: to_bits ( val) 
1467+         fn  from ( val :  I2scfg )  -> u8  { 
1468+             I2scfg :: to_bits ( val) 
15001469        } 
15011470    } 
15021471    #[ repr( u8 ) ]  
15031472    #[ derive( Copy ,  Clone ,  Debug ,  Eq ,  PartialEq ,  Ord ,  PartialOrd ) ]  
15041473    #[ cfg_attr( feature = "defmt" ,  derive( defmt:: Format ) ) ]  
1505-     pub  enum  Isstd  { 
1474+     pub  enum  I2sstd  { 
15061475        #[ doc = "I2S Philips standard" ]  
15071476        PHILIPS  = 0x0 , 
15081477        #[ doc = "MSB justified standard" ]  
@@ -1512,26 +1481,26 @@ pub mod vals {
15121481        #[ doc = "PCM standard" ]  
15131482        PCM  = 0x03 , 
15141483    } 
1515-     impl  Isstd  { 
1484+     impl  I2sstd  { 
15161485        #[ inline( always) ]  
1517-         pub  const  fn  from_bits ( val :  u8 )  -> Isstd  { 
1486+         pub  const  fn  from_bits ( val :  u8 )  -> I2sstd  { 
15181487            unsafe  {  core:: mem:: transmute ( val &  0x03 )  } 
15191488        } 
15201489        #[ inline( always) ]  
15211490        pub  const  fn  to_bits ( self )  -> u8  { 
15221491            unsafe  {  core:: mem:: transmute ( self )  } 
15231492        } 
15241493    } 
1525-     impl  From < u8 >  for  Isstd  { 
1494+     impl  From < u8 >  for  I2sstd  { 
15261495        #[ inline( always) ]  
1527-         fn  from ( val :  u8 )  -> Isstd  { 
1528-             Isstd :: from_bits ( val) 
1496+         fn  from ( val :  u8 )  -> I2sstd  { 
1497+             I2sstd :: from_bits ( val) 
15291498        } 
15301499    } 
1531-     impl  From < Isstd >  for  u8  { 
1500+     impl  From < I2sstd >  for  u8  { 
15321501        #[ inline( always) ]  
1533-         fn  from ( val :  Isstd )  -> u8  { 
1534-             Isstd :: to_bits ( val) 
1502+         fn  from ( val :  I2sstd )  -> u8  { 
1503+             I2sstd :: to_bits ( val) 
15351504        } 
15361505    } 
15371506    #[ repr( u8 ) ]  
0 commit comments