Merge branch 'main' of github.com:embassy-rs/embassy
This commit is contained in:
@ -322,7 +322,7 @@ fn main() {
|
||||
let rst_reg = format_ident!("{}", rst.register.to_ascii_lowercase());
|
||||
let set_rst_field = format_ident!("set_{}", rst.field.to_ascii_lowercase());
|
||||
quote! {
|
||||
critical_section::with(|_| unsafe {
|
||||
critical_section::with(|_| {
|
||||
crate::pac::RCC.#rst_reg().modify(|w| w.#set_rst_field(true));
|
||||
crate::pac::RCC.#rst_reg().modify(|w| w.#set_rst_field(false));
|
||||
});
|
||||
@ -353,13 +353,13 @@ fn main() {
|
||||
})
|
||||
}
|
||||
fn enable() {
|
||||
critical_section::with(|_| unsafe {
|
||||
critical_section::with(|_| {
|
||||
crate::pac::RCC.#en_reg().modify(|w| w.#set_en_field(true));
|
||||
#after_enable
|
||||
})
|
||||
}
|
||||
fn disable() {
|
||||
critical_section::with(|_| unsafe {
|
||||
critical_section::with(|_| {
|
||||
crate::pac::RCC.#en_reg().modify(|w| w.#set_en_field(false));
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user