mirror of
https://github.com/esp-rs/esp-hal.git
synced 2025-10-02 14:44:42 +00:00
fix: Fix nightly errors (#1934)
This commit is contained in:
parent
533288d351
commit
f9ab55c38f
@ -15,6 +15,7 @@ pub(super) const RA_OFFSET: usize = 4;
|
||||
#[derive(Default, Clone, Copy)]
|
||||
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
|
||||
#[repr(C)]
|
||||
#[cfg(feature = "exception-handler")]
|
||||
pub(crate) struct TrapFrame {
|
||||
/// Return address, stores the address to return to after a function call or
|
||||
/// interrupt.
|
||||
@ -102,6 +103,7 @@ pub(crate) struct TrapFrame {
|
||||
pub mtval: usize,
|
||||
}
|
||||
|
||||
#[cfg(feature = "exception-handler")]
|
||||
impl core::fmt::Debug for TrapFrame {
|
||||
fn fmt(&self, fmt: &mut core::fmt::Formatter<'_>) -> Result<(), core::fmt::Error> {
|
||||
write!(
|
||||
|
@ -235,6 +235,8 @@ pub const SPI_DOWNLOAD_MSPI_DIS: EfuseField = EfuseField::new(EfuseBlock::Block0
|
||||
/// `[DIS_CAN]` Represents whether TWAI function is disabled or enabled. 1:
|
||||
/// disabled. 0: enabled
|
||||
pub const DIS_TWAI: EfuseField = EfuseField::new(EfuseBlock::Block0, 46, 1);
|
||||
#[allow(unknown_lints)]
|
||||
#[allow(clippy::too_long_first_doc_paragraph)]
|
||||
/// `[]` Represents whether the selection between usb_to_jtag and pad_to_jtag
|
||||
/// through strapping gpio15 when both EFUSE_DIS_PAD_JTAG and EFUSE_DIS_USB_JTAG
|
||||
/// are equal to 0 is enabled or disabled. 1: enabled. 0: disabled
|
||||
|
@ -320,6 +320,7 @@ impl embedded_io::Write for LpUart {
|
||||
match self.flush_tx() {
|
||||
Ok(_) => break,
|
||||
Err(nb::Error::WouldBlock) => { /* Wait */ }
|
||||
#[allow(unreachable_patterns)]
|
||||
Err(nb::Error::Other(e)) => return Err(e),
|
||||
}
|
||||
}
|
||||
|
@ -311,6 +311,7 @@ mod log {
|
||||
// #define ESP_EVENT_DEFINE_BASE(id) esp_event_base_t id = #id
|
||||
static mut EVT: i8 = 0;
|
||||
#[no_mangle]
|
||||
#[allow(unused_unsafe)]
|
||||
static mut WIFI_EVENT: esp_event_base_t = unsafe { addr_of!(EVT) };
|
||||
|
||||
// stuff needed by wpa-supplicant
|
||||
|
@ -438,6 +438,8 @@ impl<'d> EspNowSender<'d> {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unknown_lints)]
|
||||
#[allow(clippy::too_long_first_doc_paragraph)]
|
||||
/// This struct is returned by a sync esp now send. Invoking `wait` method of
|
||||
/// this struct will block current task until the callback function of esp now
|
||||
/// send is called and return the status of previous sending.
|
||||
@ -535,6 +537,8 @@ impl<'d> Drop for EspNowRc<'d> {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(unknown_lints)]
|
||||
#[allow(clippy::too_long_first_doc_paragraph)]
|
||||
/// ESP-NOW is a kind of connectionless Wi-Fi communication protocol that is
|
||||
/// defined by Espressif. In ESP-NOW, application data is encapsulated in a
|
||||
/// vendor-specific action frame and then transmitted from one Wi-Fi device to
|
||||
|
@ -42,7 +42,9 @@ fn main() -> ! {
|
||||
static mut _stack_end: u32;
|
||||
}
|
||||
|
||||
#[allow(unused_unsafe)]
|
||||
let stack_top = unsafe { addr_of_mut!(_stack_start) } as *mut _ as u32;
|
||||
#[allow(unused_unsafe)]
|
||||
let stack_bottom = unsafe { addr_of_mut!(_stack_end) } as *mut _ as u32;
|
||||
|
||||
let size = 4096;
|
||||
|
@ -57,6 +57,7 @@ async fn reader(
|
||||
string_buffer.extend_from_slice(&rbuf[..len]).unwrap();
|
||||
signal.signal(heapless::String::from_utf8(string_buffer).unwrap());
|
||||
}
|
||||
#[allow(unreachable_patterns)]
|
||||
Err(e) => esp_println::println!("RX Error: {:?}", e),
|
||||
}
|
||||
}
|
||||
|
@ -80,9 +80,9 @@ pub fn get_program_counter() -> *const u32 {
|
||||
unsafe {
|
||||
asm!("
|
||||
mov {1}, {2}
|
||||
call0 1f
|
||||
call0 2f
|
||||
.align 4
|
||||
1:
|
||||
2:
|
||||
mov {0}, {2}
|
||||
mov {2}, {1}
|
||||
", out(reg) x, out(reg) _, out(reg) _, options(nostack))
|
||||
|
Loading…
x
Reference in New Issue
Block a user