Move the feature gates to the i2c module instead of the pub use statement
This commit is contained in:
		
							parent
							
								
									ee93bbf1d4
								
							
						
					
					
						commit
						b6c0ddb7df
					
				@ -7,8 +7,6 @@ use crate::interrupt;
 | 
				
			|||||||
#[cfg_attr(i2c_v1, path = "v1.rs")]
 | 
					#[cfg_attr(i2c_v1, path = "v1.rs")]
 | 
				
			||||||
#[cfg_attr(all(i2c_v2, feature = "time"), path = "v2.rs")]
 | 
					#[cfg_attr(all(i2c_v2, feature = "time"), path = "v2.rs")]
 | 
				
			||||||
mod _version;
 | 
					mod _version;
 | 
				
			||||||
 | 
					 | 
				
			||||||
#[cfg(any(i2c_v1, all(i2c_v2, feature = "time")))]
 | 
					 | 
				
			||||||
pub use _version::*;
 | 
					pub use _version::*;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
use crate::peripherals;
 | 
					use crate::peripherals;
 | 
				
			||||||
 | 
				
			|||||||
@ -41,7 +41,7 @@ pub mod flash;
 | 
				
			|||||||
pub mod fmc;
 | 
					pub mod fmc;
 | 
				
			||||||
#[cfg(hrtim)]
 | 
					#[cfg(hrtim)]
 | 
				
			||||||
pub mod hrtim;
 | 
					pub mod hrtim;
 | 
				
			||||||
#[cfg(i2c)]
 | 
					#[cfg(all(i2c, any(i2c_v1, all(i2c_v2, feature = "time"))))]
 | 
				
			||||||
pub mod i2c;
 | 
					pub mod i2c;
 | 
				
			||||||
#[cfg(all(spi_v1, rcc_f4))]
 | 
					#[cfg(all(spi_v1, rcc_f4))]
 | 
				
			||||||
pub mod i2s;
 | 
					pub mod i2s;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user