Skip to content

Commit 963b8f9

Browse files
committed
chore: update some typos
1 parent 902c0ec commit 963b8f9

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ license = "MIT OR Apache-2.0"
66
description = "A platform-agnostic driver for the QMC5883P magnetic sensor."
77
keywords = ["driver", "sensor", "magnetic", "embedded-hal", "i2c", "qmc5883p", "qmc"]
88
repository = "https://github.com/KapJ1coH/qmc5883p.git"
9+
categories = ["embedded", "hardware-support", "no-std", "asynchronous"]
910

1011
[dependencies]
1112
embedded-hal = "1.0"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ qmc5883p = "0.1.0"
3030
### Basic Configuration
3131

3232
```rust
33-
use qmc5883p::{Range, Mode, QmcT883PConfig, OutputDataRate, OverSampleRate, OverSampleRatio1};
33+
use qmc5883p::{Range, Mode, Qmc5883PConfig, OutputDataRate, OverSampleRate, OverSampleRatio1};
3434

3535
// Create a custom configuration
36-
let config = QmcT883PConfig::default()
36+
let config = Qmc5883PConfig::default()
3737
.with_mode(Mode::Continuous)
3838
.with_odr(OutputDataRate::Hz100)
3939
.with_range(Range::Gauss8)

src/lib.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)