diff options
Diffstat (limited to 'embassy-time-driver/README.md')
| -rw-r--r-- | embassy-time-driver/README.md | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/embassy-time-driver/README.md b/embassy-time-driver/README.md new file mode 100644 index 000000000..74a5b7876 --- /dev/null +++ b/embassy-time-driver/README.md | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | # embassy-time-driver | ||
| 2 | |||
| 3 | |||
| 4 | This crate contains the driver trait necessary for adding [`embassy-time`](https://crates.io/crates/embassy-time) support | ||
| 5 | for a new hardware platform. | ||
| 6 | |||
| 7 | If you want to *use* `embassy-time` with already made drivers, you should depend on the main `embassy-time` crate, not on this crate. | ||
| 8 | |||
| 9 | If you are writing a driver, you should depend only on this crate, not on the main `embassy-time` crate. | ||
| 10 | This will allow your driver to continue working for newer `embassy-time` major versions, without needing an update, | ||
| 11 | if the driver trait has not had breaking changes. | ||
| 12 | |||
| 13 | ## How it works | ||
| 14 | |||
| 15 | `embassy-time` module is backed by a global "time driver" specified at build time. | ||
| 16 | Only one driver can be active in a program. | ||
| 17 | |||
| 18 | All methods and structs transparently call into the active driver. This makes it | ||
| 19 | possible for libraries to use `embassy-time` in a driver-agnostic way without | ||
| 20 | requiring generic parameters. | ||
