aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jorge Aparicio <jorge@japaric.io> 2018-05-18 19:59:07 +0200
committerGravatar Jorge Aparicio <jorge@japaric.io> 2018-05-18 19:59:07 +0200
commit39172497729e827a6bb48f899a1facf5ceb2558b (patch)
tree57a25d22679c3741da3a20a358cee0c48f5e913b
parent902d8ff191cbfad2a6735b50cc9fcb833c3e6379 (diff)
downloadcortex-m-39172497729e827a6bb48f899a1facf5ceb2558b.tar.gz
cortex-m-39172497729e827a6bb48f899a1facf5ceb2558b.tar.zst
cortex-m-39172497729e827a6bb48f899a1facf5ceb2558b.zip
v0.5.2v0.5.2
-rw-r--r--CHANGELOG.md12
-rw-r--r--Cargo.toml2
-rw-r--r--src/asm.rs1
3 files changed, 13 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 77236e0..420aead 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
+## [v0.5.2] - 2018-05-18
+
+### Added
+
+- `SCB` gained a pair of safe methods to set / clear the DEEPSLEEP bit.
+
+- `asm::delay`, delay loops whose execution time doesn't depend on the optimization level.
+
## [v0.5.1] - 2018-05-13
### Added
@@ -452,7 +460,9 @@ fn main() {
- Functions to get the vector table
- Wrappers over miscellaneous instructions like `bkpt`
-[Unreleased]: https://github.com/japaric/cortex-m/compare/v0.5.0...HEAD
+[Unreleased]: https://github.com/japaric/cortex-m/compare/v0.5.2...HEAD
+[v0.5.2]: https://github.com/japaric/cortex-m/compare/v0.5.1...v0.5.2
+[v0.5.1]: https://github.com/japaric/cortex-m/compare/v0.5.0...v0.5.1
[v0.5.0]: https://github.com/japaric/cortex-m/compare/v0.4.3...v0.5.0
[v0.4.3]: https://github.com/japaric/cortex-m/compare/v0.4.2...v0.4.3
[v0.4.2]: https://github.com/japaric/cortex-m/compare/v0.4.1...v0.4.2
diff --git a/Cargo.toml b/Cargo.toml
index 88e0415..dfb504b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -7,7 +7,7 @@ keywords = ["arm", "cortex-m", "register", "peripheral"]
license = "MIT OR Apache-2.0"
name = "cortex-m"
repository = "https://github.com/japaric/cortex-m"
-version = "0.5.1"
+version = "0.5.2"
[build-dependencies]
cc = "1.0.10"
diff --git a/src/asm.rs b/src/asm.rs
index fd1ce7c..5a35fa3 100644
--- a/src/asm.rs
+++ b/src/asm.rs
@@ -32,6 +32,7 @@ pub fn bkpt() {
/// NOTE that the delay can take much longer if interrupts are serviced during its execution.
#[inline]
pub fn delay(_n: u32) {
+ // NOTE(divide by 4) is easier to compute than `/ 3` is it's just a shift (`>> 2`).
match () {
#[cfg(all(cortex_m, feature = "inline-asm"))]
() => unsafe {