Skip to content

Commit

Permalink
more pac updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ptpaterson committed Dec 27, 2023
1 parent 0e7cd9b commit a234de9
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions esp-hal-common/src/twai/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ mod asynch {
T::async_state().tx_waker.register(cx.waker());

let register_block = T::register_block();
let status = register_block.status.read();
let status = register_block.status().read();

// Check that the peripheral is not in a bus off state.
if status.bus_off_st().bit_is_set() {
Expand Down Expand Up @@ -937,7 +937,7 @@ mod asynch {
return Poll::Ready(result);
} else {
let register_block = T::register_block();
let status = register_block.status.read();
let status = register_block.status().read();

// Check that the peripheral is not in a bus off state.
if status.bus_off_st().bit_is_set() {
Expand All @@ -961,8 +961,8 @@ mod asynch {
fn TWAI0() {
let register_block = TWAI0::register_block();

let intr_enable = register_block.int_ena.read();
let intr_status = register_block.int_raw.read();
let intr_enable = register_block.int_ena().read();
let intr_status = register_block.int_raw().read();

let async_state = TWAI0::async_state();

Expand All @@ -971,7 +971,7 @@ mod asynch {
}

if intr_status.rx_int_st().bit_is_set() {
let status = register_block.status.read();
let status = register_block.status().read();

let rx_queue = &async_state.rx_queue;

Expand All @@ -987,7 +987,7 @@ mod asynch {

let _ = rx_queue.try_send(Ok(frame));

register_block.cmd.write(|w| w.release_buf().set_bit());
register_block.cmd().write(|w| w.release_buf().set_bit());
}

if intr_status.bits() & 0b11111100 > 0 {
Expand All @@ -996,7 +996,7 @@ mod asynch {

unsafe {
register_block
.int_ena
.int_ena()
.modify(|_, w| w.bits(intr_enable.bits() & (!intr_status.bits() | 1)));
}
}
Expand All @@ -1006,8 +1006,8 @@ mod asynch {
fn TWAI0() {
let register_block = TWAI0::register_block();

let intr_enable = register_block.interrupt_enable.read();
let intr_status = register_block.interrupt.read();
let intr_enable = register_block.interrupt_enable().read();
let intr_status = register_block.interrupt().read();

let async_state = TWAI0::async_state();

Expand All @@ -1016,7 +1016,7 @@ mod asynch {
}

if intr_status.receive_int_st().bit_is_set() {
let status = register_block.status.read();
let status = register_block.status().read();

let rx_queue = &async_state.rx_queue;

Expand All @@ -1032,7 +1032,7 @@ mod asynch {

let _ = rx_queue.try_send(Ok(frame));

register_block.cmd.write(|w| w.release_buf().set_bit());
register_block.cmd().write(|w| w.release_buf().set_bit());
}

if intr_status.bits() & 0b11111100 > 0 {
Expand All @@ -1041,7 +1041,7 @@ mod asynch {

unsafe {
register_block
.interrupt_enable
.interrupt_enable()
.modify(|_, w| w.bits(intr_enable.bits() & (!intr_status.bits() | 1)));
}
}
Expand All @@ -1051,8 +1051,8 @@ mod asynch {
fn TWAI1() {
let register_block = TWAI1::register_block();

let intr_enable = register_block.interrupt_enable.read();
let intr_status = register_block.interrupt.read();
let intr_enable = register_block.interrupt_enable().read();
let intr_status = register_block.interrupt().read();

let async_state = TWAI1::async_state();

Expand All @@ -1061,7 +1061,7 @@ mod asynch {
}

if intr_status.receive_int_st().bit_is_set() {
let status = register_block.status.read();
let status = register_block.status().read();

let rx_queue = &async_state.rx_queue;

Expand All @@ -1077,7 +1077,7 @@ mod asynch {

let _ = rx_queue.try_send(Ok(frame));

register_block.cmd.write(|w| w.release_buf().set_bit());
register_block.cmd().write(|w| w.release_buf().set_bit());
}

if intr_status.bits() & 0b11111100 > 0 {
Expand All @@ -1086,7 +1086,7 @@ mod asynch {

unsafe {
register_block
.interrupt_enable
.interrupt_enable()
.modify(|_, w| w.bits(intr_enable.bits() & (!intr_status.bits() | 1)));
}
}
Expand Down

0 comments on commit a234de9

Please sign in to comment.