You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ See the documentation for usage examples.
21
21
* You plan on using a single motor without the standby feature: use `Motor`
22
22
23
23
## Optional features
24
-
*`defmt`: you can enable the [`defmt`](https://defmt.ferrous-systems.com/) feature to get a `defmt::debug!` call for every speed change.
24
+
*`defmt-03`: you can enable this feature to get a `defmt::Format` implementation for all structs & enums in this crate and a `defmt::debug` call for every speed change.
25
25
26
26
## Examples
27
27
A simple example for the STM32F4 microcontrollers is [available](examples/stm32f4-single-motor-example/README.md).
Copy file name to clipboardExpand all lines: src/lib.rs
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@
11
11
//! * You plan on using a single motor without the standby feature: use [`Motor`]
12
12
//!
13
13
//! ## Optional features
14
-
//! * `defmt`: you can enable the `defmt` feature to get a `defmt::Format` implementation for all structs & enums in this crate and a `defmt::debug` call for every speed change.
14
+
//! * `defmt-03`: you can enable this feature to get a `defmt::Format` implementation for all structs & enums in this crate and a `defmt::debug` call for every speed change.
15
15
16
16
#![forbid(unsafe_code)]
17
17
#![deny(warnings)]
@@ -20,14 +20,14 @@
20
20
#![deny(unused)]
21
21
#![no_std]
22
22
23
-
#[cfg(feature = "defmt")]
23
+
#[cfg(feature = "defmt-03")]
24
24
use defmt::Format;
25
25
use embedded_hal::digital::{OutputPin,StatefulOutputPin};
26
26
use embedded_hal::pwm::SetDutyCycle;
27
27
28
28
/// Defines errors which can happen when calling [`Motor::drive()`].
29
29
#[derive(PartialEq,Eq,Debug,Copy,Clone)]
30
-
#[cfg_attr(feature = "defmt", derive(Format))]
30
+
#[cfg_attr(feature = "defmt-03", derive(Format))]
31
31
pubenumMotorError<IN1Error,IN2Error,PWMError>{
32
32
/// An invalid speed has been defined. The speed must be given as a percentage value between 0 and 100 to be valid.
0 commit comments