aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bors[bot] <26634292+bors[bot]@users.noreply.github.com> 2020-12-03 11:51:32 +0000
committerGravatar GitHub <noreply@github.com> 2020-12-03 11:51:32 +0000
commitd6fb22e0fe541595d0a710e5b4faa323171c18f4 (patch)
tree5229dcf85f25dba82d2d523eeb59e3b1478c19af /src
parent038396e6f944fb8697e2d4ecbd88cfca9d16b90e (diff)
parent99cf0fb3dfb20037e00fb48d2839158637991e7f (diff)
downloadcortex-m-d6fb22e0fe541595d0a710e5b4faa323171c18f4.tar.gz
cortex-m-d6fb22e0fe541595d0a710e5b4faa323171c18f4.tar.zst
cortex-m-d6fb22e0fe541595d0a710e5b4faa323171c18f4.zip
Merge #297
297: Deprecate msp::write r=adamgreig a=jonas-schievink The function can not be used from Rust code, because it destroys the stack frame. Users must use an assembly block (inline or out-of-line) that both sets MSP and performs a method call. Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/register/msp.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/register/msp.rs b/src/register/msp.rs
index 2e8261e..78f507c 100644
--- a/src/register/msp.rs
+++ b/src/register/msp.rs
@@ -8,6 +8,7 @@ pub fn read() -> u32 {
/// Writes `bits` to the CPU register
#[inline]
+#[deprecated = "calling this function invokes Undefined Behavior"]
pub unsafe fn write(bits: u32) {
call_asm!(__msp_w(bits: u32));
}