@@ -157,9 +157,9 @@ pub enum SetResetMode {
157157/// Example:
158158///
159159/// ```rust
160- /// use qmc5883p::{Range, Mode, QmcT883PConfig , OutputDataRate, OverSampleRate, OverSampleRatio1 };
160+ /// use qmc5883p::{Range, Mode, Qmc5883PConfig , OutputDataRate, OverSampleRate, OverSampleRatio1 };
161161///
162- /// let config = QmcT883PConfig ::default()
162+ /// let config = Qmc5883PConfig ::default()
163163/// .with_mode(Mode::Continuous)
164164/// .with_odr(OutputDataRate::Hz100)
165165/// .with_range(Range::Gauss8)
@@ -169,7 +169,7 @@ pub enum SetResetMode {
169169/// ```
170170#[ cfg_attr( feature = "defmt" , derive( defmt:: Format ) ) ]
171171#[ derive( Debug , Clone , Copy ) ]
172- pub struct QmcT883PConfig {
172+ pub struct Qmc5883PConfig {
173173 pub mode : Mode ,
174174 pub odr : OutputDataRate ,
175175 pub rng : Range ,
@@ -179,7 +179,7 @@ pub struct QmcT883PConfig {
179179 self_test : SelfTest ,
180180}
181181
182- impl QmcT883PConfig {
182+ impl Qmc5883PConfig {
183183 /// Refer to the default implementation for default values.
184184 pub fn new ( ) -> Self {
185185 Self :: default ( )
@@ -231,7 +231,7 @@ impl QmcT883PConfig {
231231 }
232232}
233233
234- impl Default for QmcT883PConfig {
234+ impl Default for Qmc5883PConfig {
235235 /// Start a new configuration with default values.
236236 fn default ( ) -> Self {
237237 Self {
@@ -276,7 +276,7 @@ where
276276 Self { i2c }
277277 }
278278
279- pub async fn init ( & mut self , config : QmcT883PConfig ) -> Result < ( ) , QmcError < E > > {
279+ pub async fn init ( & mut self , config : Qmc5883PConfig ) -> Result < ( ) , QmcError < E > > {
280280 trace ! ( "Initializing QMC5883P Sensor..." ) ;
281281 self . check_id ( ) . await ?;
282282
@@ -304,7 +304,7 @@ where
304304 }
305305
306306 /// Applies the given configuration to the sensor by writing to the control registers.
307- pub async fn apply_configuration ( & mut self , config : QmcT883PConfig ) -> Result < ( ) , QmcError < E > > {
307+ pub async fn apply_configuration ( & mut self , config : Qmc5883PConfig ) -> Result < ( ) , QmcError < E > > {
308308 self . configure_control_register_1 ( config. to_control1_byte ( ) )
309309 . await ?;
310310 self . configure_control_register_2 ( config. to_control2_byte ( ) )
@@ -477,7 +477,7 @@ where
477477 ///
478478 /// # Returns
479479 /// The magnitude in **raw LSB**. To convert to Gauss, divide this value by
480- /// the sensitivity of your current `Range` setting.
480+ /// the sensitivity of your current `Range` setting, see [`Range::sensitivity`] .
481481 ///
482482 /// * Range::Gauss2 -> / 15000.0
483483 /// * Range::Gauss8 -> / 3750.0
@@ -681,7 +681,7 @@ mod tests {
681681 //! Control 2: Soft(0) | Self(0) | Rng(Gauss8=10) << 2 | SetReset(On=00)
682682 //! Binary: 0 0 10 00 -> 0x08
683683
684- let config = QmcT883PConfig :: default ( )
684+ let config = Qmc5883PConfig :: default ( )
685685 . with_osr2 ( OverSampleRate :: Rate8 ) // 0b11
686686 . with_osr1 ( OverSampleRatio1 :: Ratio4 ) // 0b01
687687 . with_odr ( OutputDataRate :: Hz100 ) // 0b10
0 commit comments