Skip to content

Commit

Permalink
Docs: Rename DelayUs to DelayNs in docs for macros. (rtic-rs#908)
Browse files Browse the repository at this point in the history
  • Loading branch information
orsinium authored Mar 24, 2024
1 parent 4060c3d commit fa2a5b4
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
2 changes: 2 additions & 0 deletions rtic-time/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ For each category, *Added*, *Changed*, *Fixed* add new entries at the top!

### Fixed

- Docs: Rename `DelayUs` to `DelayNs` in docs.

## v1.3.0 - 2024-01-10

### Changed
Expand Down
28 changes: 20 additions & 8 deletions rtic-time/src/monotonic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,11 @@ pub trait Monotonic {
fn disable_timer() {}
}

/// Creates impl blocks for `embedded_hal::delay::DelayUs`,
/// based on `fugit::ExtU64Ceil`.
/// Creates impl blocks for [`embedded_hal::delay::DelayNs`][DelayNs],
/// based on [`fugit::ExtU64Ceil`][ExtU64Ceil].
///
/// [DelayNs]: https://docs.rs/embedded-hal/latest/embedded_hal/delay/trait.DelayNs.html
/// [ExtU64Ceil]: https://docs.rs/fugit/latest/fugit/trait.ExtU64Ceil.html
#[macro_export]
macro_rules! embedded_hal_delay_impl_fugit64 {
($t:ty) => {
Expand Down Expand Up @@ -121,8 +124,11 @@ macro_rules! embedded_hal_delay_impl_fugit64 {
};
}

/// Creates impl blocks for `embedded_hal_async::delay::DelayUs`,
/// based on `fugit::ExtU64Ceil`.
/// Creates impl blocks for [`embedded_hal_async::delay::DelayNs`][DelayNs],
/// based on [`fugit::ExtU64Ceil`][ExtU64Ceil].
///
/// [DelayNs]: https://docs.rs/embedded-hal-async/latest/embedded_hal_async/delay/trait.DelayNs.html
/// [ExtU64Ceil]: https://docs.rs/fugit/latest/fugit/trait.ExtU64Ceil.html
#[macro_export]
macro_rules! embedded_hal_async_delay_impl_fugit64 {
($t:ty) => {
Expand All @@ -148,8 +154,11 @@ macro_rules! embedded_hal_async_delay_impl_fugit64 {
};
}

/// Creates impl blocks for `embedded_hal::delay::DelayUs`,
/// based on `fugit::ExtU32Ceil`.
/// Creates impl blocks for [`embedded_hal::delay::DelayNs`][DelayNs],
/// based on [`fugit::ExtU32Ceil`][ExtU32Ceil].
///
/// [DelayNs]: https://docs.rs/embedded-hal/latest/embedded_hal/delay/trait.DelayNs.html
/// [ExtU32Ceil]: https://docs.rs/fugit/latest/fugit/trait.ExtU32Ceil.html
#[macro_export]
macro_rules! embedded_hal_delay_impl_fugit32 {
($t:ty) => {
Expand Down Expand Up @@ -196,8 +205,11 @@ macro_rules! embedded_hal_delay_impl_fugit32 {
};
}

/// Creates impl blocks for `embedded_hal_async::delay::DelayUs`,
/// based on `fugit::ExtU32Ceil`.
/// Creates impl blocks for [`embedded_hal_async::delay::DelayNs`][DelayNs],
/// based on [`fugit::ExtU32Ceil`][ExtU32Ceil].
///
/// [DelayNs]: https://docs.rs/embedded-hal-async/latest/embedded_hal_async/delay/trait.DelayNs.html
/// [ExtU32Ceil]: https://docs.rs/fugit/latest/fugit/trait.ExtU32Ceil.html
#[macro_export]
macro_rules! embedded_hal_async_delay_impl_fugit32 {
($t:ty) => {
Expand Down
2 changes: 1 addition & 1 deletion rtic-time/tests/delay_precision_subtick.rs
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ fn timer_queue_subtick_precision() {
// then we will actually wait c subticks.
// The important part is that c is never smaller than b,
// in all cases, as that would violate the contract of
// embedded-hal's DelayUs.
// embedded-hal's DelayNs.

subtick_test!(0, 0, 0);
subtick_test!(0, 1, 20);
Expand Down

0 comments on commit fa2a5b4

Please sign in to comment.