aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJorge Aparicio <japaricious@gmail.com>2017-03-10 20:11:36 -0500
committerJorge Aparicio <japaricious@gmail.com>2017-03-10 20:11:36 -0500
commit7604400fd07798894cc03d62d5d2fe7a3612a07c (patch)
treea8cf49129a2f77f0c9b592c05e0187c2753508f4
parent4da1963c8ba6e0098ebcb489d34d538d13d309b7 (diff)
Token was renamed to Context
-rw-r--r--src/lib.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib.rs b/src/lib.rs
index bc2f122..bbe54d9 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -10,7 +10,7 @@
extern crate cortex_m;
-use cortex_m::ctxt::Token;
+use cortex_m::ctxt::Context;
use cortex_m::peripheral::Peripheral;
use cortex_m::register::{basepri, basepri_max};
@@ -67,7 +67,7 @@ impl<P, C> ResourceP<P, C>
pub unsafe fn borrow<'ctxt, Ctxt>(&'static self,
_ctxt: &'ctxt Ctxt)
-> &'ctxt P
- where Ctxt: Token
+ where Ctxt: Context
{
&*self.peripheral.get()
}
@@ -84,7 +84,7 @@ impl<P, C> ResourceP<P, C>
impl<P> ResourceP<P, C0> {
/// Borrows the resource without locking
pub fn borrow<'ctxt, Ctxt>(&'static self, _ctxt: &'ctxt Ctxt) -> &'ctxt P
- where Ctxt: Token
+ where Ctxt: Context
{
unsafe { &*self.peripheral.get() }
}
@@ -129,7 +129,7 @@ impl<T, C> Resource<T, C>
pub unsafe fn borrow<'ctxt, Ctxt>(&'static self,
_ctxt: &'ctxt Ctxt)
-> &'ctxt T
- where Ctxt: Token
+ where Ctxt: Context
{
&*self.data.get()
}
@@ -138,7 +138,7 @@ impl<T, C> Resource<T, C>
impl<T> Resource<T, C0> {
/// Borrows the resource without locking
pub fn borrow<'ctxt, Ctxt>(&'static self, _ctxt: &'ctxt Ctxt) -> &'ctxt T
- where Ctxt: Token
+ where Ctxt: Context
{
unsafe { &*self.data.get() }
}