mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-12-24 19:09:33 +01:00
misc fixes
This commit is contained in:
parent
c64e7decfe
commit
bf4eabf287
1 changed files with 7 additions and 7 deletions
|
@ -130,7 +130,7 @@ fn idle(
|
||||||
});
|
});
|
||||||
|
|
||||||
rexprs.push(quote! {
|
rexprs.push(quote! {
|
||||||
#name: ::krate::Static::ref_mut(
|
#name: ::#krate::Static::ref_mut(
|
||||||
&mut *::#device::#name.get(),
|
&mut *::#device::#name.get(),
|
||||||
),
|
),
|
||||||
});
|
});
|
||||||
|
@ -423,16 +423,16 @@ fn resources(app: &App, ownerships: &Ownerships, root: &mut Vec<Tokens>) {
|
||||||
fn borrow<'cs>(
|
fn borrow<'cs>(
|
||||||
&'cs self,
|
&'cs self,
|
||||||
_cs: &'cs #krate::CriticalSection,
|
_cs: &'cs #krate::CriticalSection,
|
||||||
) -> &'cs #krate::Static<#name> {
|
) -> &'cs #krate::Static<#device::#name> {
|
||||||
unsafe { #krate::Static::ref_(&*#name.get()) }
|
unsafe { #krate::Static::ref_(&*#device::#name.get()) }
|
||||||
}
|
}
|
||||||
|
|
||||||
fn borrow_mut<'cs>(
|
fn borrow_mut<'cs>(
|
||||||
&'cs mut self,
|
&'cs mut self,
|
||||||
_cs: &'cs #krate::CriticalSection,
|
_cs: &'cs #krate::CriticalSection,
|
||||||
) -> &'cs mut #krate::Static<#name> {
|
) -> &'cs mut #krate::Static<#device::#name> {
|
||||||
unsafe {
|
unsafe {
|
||||||
#krate::Static::ref_mut(&mut *#name.get())
|
#krate::Static::ref_mut(&mut *#device::#name.get())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -443,7 +443,7 @@ fn resources(app: &App, ownerships: &Ownerships, root: &mut Vec<Tokens>) {
|
||||||
) -> R
|
) -> R
|
||||||
where
|
where
|
||||||
F: FnOnce(
|
F: FnOnce(
|
||||||
&#krate::Static<#name>,
|
&#krate::Static<#device::#name>,
|
||||||
&mut #krate::Threshold) -> R
|
&mut #krate::Threshold) -> R
|
||||||
{
|
{
|
||||||
unsafe {
|
unsafe {
|
||||||
|
@ -465,7 +465,7 @@ fn resources(app: &App, ownerships: &Ownerships, root: &mut Vec<Tokens>) {
|
||||||
) -> R
|
) -> R
|
||||||
where
|
where
|
||||||
F: FnOnce(
|
F: FnOnce(
|
||||||
&mut #krate::Static<#name>,
|
&mut #krate::Static<#device::#name>,
|
||||||
&mut #krate::Threshold) -> R
|
&mut #krate::Threshold) -> R
|
||||||
{
|
{
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|
Loading…
Reference in a new issue