mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-12-01 16:04:33 +01:00
Token was renamed to Context
This commit is contained in:
parent
4da1963c8b
commit
7604400fd0
1 changed files with 5 additions and 5 deletions
10
src/lib.rs
10
src/lib.rs
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
extern crate cortex_m;
|
extern crate cortex_m;
|
||||||
|
|
||||||
use cortex_m::ctxt::Token;
|
use cortex_m::ctxt::Context;
|
||||||
use cortex_m::peripheral::Peripheral;
|
use cortex_m::peripheral::Peripheral;
|
||||||
use cortex_m::register::{basepri, basepri_max};
|
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,
|
pub unsafe fn borrow<'ctxt, Ctxt>(&'static self,
|
||||||
_ctxt: &'ctxt Ctxt)
|
_ctxt: &'ctxt Ctxt)
|
||||||
-> &'ctxt P
|
-> &'ctxt P
|
||||||
where Ctxt: Token
|
where Ctxt: Context
|
||||||
{
|
{
|
||||||
&*self.peripheral.get()
|
&*self.peripheral.get()
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ impl<P, C> ResourceP<P, C>
|
||||||
impl<P> ResourceP<P, C0> {
|
impl<P> ResourceP<P, C0> {
|
||||||
/// Borrows the resource without locking
|
/// Borrows the resource without locking
|
||||||
pub fn borrow<'ctxt, Ctxt>(&'static self, _ctxt: &'ctxt Ctxt) -> &'ctxt P
|
pub fn borrow<'ctxt, Ctxt>(&'static self, _ctxt: &'ctxt Ctxt) -> &'ctxt P
|
||||||
where Ctxt: Token
|
where Ctxt: Context
|
||||||
{
|
{
|
||||||
unsafe { &*self.peripheral.get() }
|
unsafe { &*self.peripheral.get() }
|
||||||
}
|
}
|
||||||
|
@ -129,7 +129,7 @@ impl<T, C> Resource<T, C>
|
||||||
pub unsafe fn borrow<'ctxt, Ctxt>(&'static self,
|
pub unsafe fn borrow<'ctxt, Ctxt>(&'static self,
|
||||||
_ctxt: &'ctxt Ctxt)
|
_ctxt: &'ctxt Ctxt)
|
||||||
-> &'ctxt T
|
-> &'ctxt T
|
||||||
where Ctxt: Token
|
where Ctxt: Context
|
||||||
{
|
{
|
||||||
&*self.data.get()
|
&*self.data.get()
|
||||||
}
|
}
|
||||||
|
@ -138,7 +138,7 @@ impl<T, C> Resource<T, C>
|
||||||
impl<T> Resource<T, C0> {
|
impl<T> Resource<T, C0> {
|
||||||
/// Borrows the resource without locking
|
/// Borrows the resource without locking
|
||||||
pub fn borrow<'ctxt, Ctxt>(&'static self, _ctxt: &'ctxt Ctxt) -> &'ctxt T
|
pub fn borrow<'ctxt, Ctxt>(&'static self, _ctxt: &'ctxt Ctxt) -> &'ctxt T
|
||||||
where Ctxt: Token
|
where Ctxt: Context
|
||||||
{
|
{
|
||||||
unsafe { &*self.data.get() }
|
unsafe { &*self.data.get() }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue