Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V0.6 Release #28

Merged
merged 24 commits into from
Jul 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d1ae2c2
refactoring
PTaylor-us Jun 25, 2020
dcc88b7
docs: Add changelog back to v0.5.0 release
PTaylor-us Jun 27, 2020
72d18a1
chore: Update dependency versions
PTaylor-us Jun 30, 2020
522c03d
docs: Cleanup
PTaylor-us Jun 30, 2020
909d5a5
Create CODE_OF_CONDUCT.md
PTaylor-us Jul 2, 2020
8242962
Merge pull request #34 from FluenTech/add-code-of-conduct
PTaylor-us Jul 3, 2020
f3e05c9
Change all inner types to unsigned
PTaylor-us Jun 26, 2020
c1debd2
feat(Clock): Allow `Clock` impls to be stateful
PTaylor-us Jun 30, 2020
4a859da
refactor(Clock): Allow immutable `Clock` objects
PTaylor-us Jul 2, 2020
6df560f
feat(Clock): Add `Result` return to `Clock` methods
PTaylor-us Jul 1, 2020
4c8a09e
feat(Clock): Add Error variants
PTaylor-us Jul 1, 2020
db779d0
refactor(Clock): Changed error handling scheme
PTaylor-us Jul 2, 2020
c47b8ef
feat: Add `Infallible` error type
PTaylor-us Jul 2, 2020
407addd
Add `Timer` type
PTaylor-us Jun 25, 2020
e6883ce
refactor(Clock): Remove `Clock::delay()`
PTaylor-us Jun 29, 2020
d5a5ba2
feat(Timer): Add functions to read elapsed and remaining time from a …
PTaylor-us Jun 29, 2020
24ba400
feat(Timer): Add return from OneShot Timer::wait()
PTaylor-us Jun 29, 2020
8b7fe88
test(Timer): Stabilize tests
PTaylor-us Jun 29, 2020
665f868
refactor(duration): Public Interface
PTaylor-us Jul 3, 2020
c607e81
docs: Extensive documenation additions and changes
PTaylor-us Jul 3, 2020
6f9d560
refactor(clock): Remove default from clock::Error type parameter
PTaylor-us Jul 3, 2020
9d76e94
build(examples): Remove cortex-m patch and mutex-trait dependency
PTaylor-us Jul 3, 2020
ca7bff4
refactor(Timer): Set duration upon construction
PTaylor-us Jul 3, 2020
c04a901
docs(crate): Pre-release updating
PTaylor-us Jul 3, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Changelog

## [Unreleased]


[unreleased]: https://github.com/FluenTech/embedded-time/compare/v0.6.0...HEAD

## [0.6.0] - 2020-07-03

### Added

- A `Timer` type supporting one-shot and periodic software timers utilizing a `Clock` implementation
- Fallibility and error handling for `Clock` methods
- `Instant::duration_until()` with order checking
- Order checking to `Instant::duration_since()`
- Bounds checking on `Instant` impls of Add/Sub
- Changelog back to v0.5.0 release
- [`crossbeam-utils`](https://crates.io/crates/crossbeam-utils) dev-dependency for scoped threads in tests

### Changed

- Add `&self` to `Clock` functions (make stateful, or at least allow stateful implementations)
- All time-type inner types from signed to unsigned
- `Instant::duration_since()` return type to `Result`
- Refactor `examples/nrf52_dk`

[0.6.0]: https://github.com/FluenTech/embedded-time/compare/v0.5.2...v0.6.0

## [0.5.2] - 2020-06-21

### Added

- Ability to convert to/from [`core::time::Duration`](https://doc.rust-lang.org/stable/core/time/struct.Duration.html)
- Missing documentation

### Changed

- Moved majority of `Duration`-related documentation to `Duration` trait
- Minor refactoring

[0.5.2]: https://github.com/FluenTech/embedded-time/compare/v0.5.1...v0.5.2


## [0.5.1] - 2020-06-21

### Changed

- Repository location

### Removed

- `Period` from `prelude` mod as it is no longer a trait

[0.5.1]: https://github.com/FluenTech/embedded-time/compare/v0.5.0...v0.5.1


## [0.5.0] - 2020-06-17

### Added

- `cargo doc` CI test
- Frequency-based type (`Hertz`) with conversion to/from `Period`
- CI tests for `stable`

### Changed

- Rename `duration::time_units` to `duration::units` (`units` is also re-exported)
- Rename `TimeRep` to `TimeInt`
- Update `num` to v0.3.x
- Make `Period` a struct that wraps a `Ratio`, rather than a trait

### Removed

- `associated_type_bounds` feature flag to allow `stable` build
- Re-export of the `duration` module (wasn't useful)

[0.5.0]: https://github.com/FluenTech/embedded-time/compare/v0.4.0...v0.5.0
76 changes: 76 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
95 changes: 75 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 3 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "embedded-time"
version = "0.5.2"
version = "0.6.0"
authors = ["Peter Taylor <[email protected]>"]
edition = "2018"
description = "A library for abstracting clocks and handling time(ing) in embedded systems"
Expand All @@ -20,7 +20,6 @@ cortex-m = "0.6.2"
cortex-m-rt = "0.6.12"
panic_rtt = "0.3.0"
nrf52832-hal = { version = "0.10.0", default-features = false, features = ["rt", "xxAA-package"] }
mutex-trait = "0.2.0"

[patch.crates-io]
cortex-m = { git = "https://github.com/rust-embedded/cortex-m", branch = "mutex_add" }
[target.'cfg(not(target_arch = "arm"))'.dev-dependencies]
crossbeam-utils = "0.7.2"
40 changes: 35 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,42 @@
[docs.rs]: https://docs.rs/embedded-time/badge.svg

`embedded-time` provides a comprehensive library for implementing abstractions over
hardware and work with _clocks_, _instants_, _durations_, _periods_, and _frequencies_ in a more intuitive way.

hardware and work with _clocks_, _timers_, _instants_, _durations_, _periods_, and _frequencies_ in a more intuitive way.

## Hardware Abstraction

- `Clock` trait allowing abstraction of hardware timers for timekeeping.
- Work with time using _milliseconds_, _seconds_, _hertz_, etc. rather than _cycles_ or _ticks_.
- Includes example for the nRF52_DK board
- Conversion to/from core::time::Duration

## Timers

- Software timers spawned from a `Clock` impl object.
- One-shot or periodic/continuous
- Blocking delay
- Poll for expiration
- Read elapsed/remaining duration

## Duration Types

- Nanoseconds
- Microseconds
- Milliseconds
- Seconds
- Minutes
- Hours

## Frequency Type

- Hertz

## `core` Compatibility

- Conversion to/from `core::time::Duration`

## Reliability and Usability
- Extensive tests
- Thorough documentation with examples
- Example for the nRF52_DK board


## License
This project is licensed under either of
Expand Down
Loading