Remove unnecessary rt crate dependencies (#391)
* Remove unnecessary `rt` crate dependencies * Bump versions, update to latest released dependencies
This commit is contained in:
parent
df891b4b02
commit
4e88e48bbe
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "esp-hal-common"
|
||||
version = "0.5.0"
|
||||
version = "0.6.0"
|
||||
authors = [
|
||||
"Jesse Braham <jesse@beta7.io>",
|
||||
"Björn Quentin <bjoern.quentin@mobile-j.de>",
|
||||
@ -24,7 +24,7 @@ fugit = "0.3.6"
|
||||
lock_api = { version = "0.4.9", optional = true }
|
||||
nb = "1.0.0"
|
||||
paste = "1.0.11"
|
||||
procmacros = { version = "0.2.0", package = "esp-hal-procmacros", path = "../esp-hal-procmacros" }
|
||||
procmacros = { version = "0.3.0", package = "esp-hal-procmacros", path = "../esp-hal-procmacros" }
|
||||
strum = { version = "0.24.1", default-features = false, features = ["derive"] }
|
||||
void = { version = "1.0.2", default-features = false }
|
||||
usb-device = { version = "0.2.9", optional = true }
|
||||
@ -40,8 +40,8 @@ esp-riscv-rt = { version = "0.1.0", optional = true }
|
||||
riscv-atomic-emulation-trap = { version = "0.4.0", optional = true }
|
||||
|
||||
# Xtensa
|
||||
xtensa-lx = { version = "0.7.0", optional = true }
|
||||
xtensa-lx-rt = { version = "0.14.0", optional = true }
|
||||
xtensa-lx = { version = "0.8.0", optional = true }
|
||||
xtensa-lx-rt = { version = "0.15.0", optional = true }
|
||||
|
||||
# Smart-LED (e.g., WS2812/SK68XX) support
|
||||
smart-leds-trait = { version = "0.2.1", optional = true }
|
||||
@ -53,18 +53,18 @@ ufmt-write = { version = "0.1.0", optional = true }
|
||||
# Each supported device MUST have its PAC included below along with a
|
||||
# corresponding feature. We rename the PAC packages because we cannot
|
||||
# have dependencies and features with the same names.
|
||||
esp32 = { version = "0.19.0", features = ["critical-section"], optional = true }
|
||||
esp32c2 = { version = "0.7.0", features = ["critical-section"], optional = true }
|
||||
esp32c3 = { version = "0.10.0", features = ["critical-section"], optional = true }
|
||||
esp32s2 = { version = "0.10.0", features = ["critical-section"], optional = true }
|
||||
esp32s3 = { version = "0.13.0", features = ["critical-section"], optional = true }
|
||||
esp32 = { version = "0.21.0", features = ["critical-section"], optional = true }
|
||||
esp32c2 = { version = "0.8.0", features = ["critical-section"], optional = true }
|
||||
esp32c3 = { version = "0.11.0", features = ["critical-section"], optional = true }
|
||||
esp32s2 = { version = "0.12.0", features = ["critical-section"], optional = true }
|
||||
esp32s3 = { version = "0.15.0", features = ["critical-section"], optional = true }
|
||||
|
||||
[features]
|
||||
esp32 = ["esp32/rt" , "xtensa", "xtensa-lx/esp32", "xtensa-lx-rt/esp32", "lock_api"]
|
||||
esp32c2 = ["esp32c2/rt", "riscv"]
|
||||
esp32c3 = ["esp32c3/rt", "riscv"]
|
||||
esp32s2 = ["esp32s2/rt", "xtensa", "xtensa-lx/esp32s2", "xtensa-lx-rt/esp32s2", "esp-synopsys-usb-otg", "usb-device"]
|
||||
esp32s3 = ["esp32s3/rt", "xtensa", "xtensa-lx/esp32s3", "xtensa-lx-rt/esp32s3", "lock_api", "esp-synopsys-usb-otg", "usb-device"]
|
||||
esp32 = ["esp32/rt" , "xtensa", "xtensa-lx/esp32", "xtensa-lx-rt/esp32", "lock_api", "procmacros/esp32"]
|
||||
esp32c2 = ["esp32c2/rt", "riscv", "procmacros/esp32c2"]
|
||||
esp32c3 = ["esp32c3/rt", "riscv", "procmacros/esp32c3"]
|
||||
esp32s2 = ["esp32s2/rt", "xtensa", "xtensa-lx/esp32s2", "xtensa-lx-rt/esp32s2", "esp-synopsys-usb-otg", "usb-device", "procmacros/esp32s2"]
|
||||
esp32s3 = ["esp32s3/rt", "xtensa", "xtensa-lx/esp32s3", "xtensa-lx-rt/esp32s3", "lock_api", "esp-synopsys-usb-otg", "usb-device", "procmacros/esp32s3"]
|
||||
|
||||
esp32c2_40mhz = []
|
||||
esp32c2_26mhz = []
|
||||
|
||||
@ -31,7 +31,27 @@
|
||||
#[cfg_attr(esp32s3, path = "peripherals/esp32s3.rs")]
|
||||
pub mod peripherals;
|
||||
|
||||
#[cfg(riscv)]
|
||||
pub use esp_riscv_rt;
|
||||
#[cfg(riscv)]
|
||||
pub use esp_riscv_rt::entry;
|
||||
#[cfg(riscv)]
|
||||
pub use esp_riscv_rt::riscv;
|
||||
pub use procmacros as macros;
|
||||
#[cfg(xtensa)]
|
||||
pub use xtensa_lx;
|
||||
#[cfg(xtensa)]
|
||||
pub use xtensa_lx_rt;
|
||||
#[cfg(xtensa)]
|
||||
pub use xtensa_lx_rt::entry;
|
||||
|
||||
/// State of the CPU saved when entering exception or interrupt
|
||||
pub mod trapframe {
|
||||
#[cfg(riscv)]
|
||||
pub use esp_riscv_rt::TrapFrame;
|
||||
#[cfg(xtensa)]
|
||||
pub use xtensa_lx_rt::exception::Context as TrapFrame;
|
||||
}
|
||||
|
||||
#[cfg(rmt)]
|
||||
pub use self::pulse_control::PulseControl;
|
||||
|
||||
@ -37,6 +37,7 @@ pub use crate::{
|
||||
DmaTransfer as _esp_hal_dma_DmaTransfer,
|
||||
DmaTransferRxTx as _esp_hal_dma_DmaTransferRxTx,
|
||||
},
|
||||
entry,
|
||||
gpio::{
|
||||
InputPin as _esp_hal_gpio_InputPin,
|
||||
OutputPin as _esp_hal_gpio_OutputPin,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "esp-hal-procmacros"
|
||||
version = "0.2.0"
|
||||
version = "0.3.0"
|
||||
authors = [
|
||||
"Jesse Braham <jesse@beta7.io>",
|
||||
"Björn Quentin <bjoern.quentin@mobile-j.de>",
|
||||
@ -20,9 +20,15 @@ proc-macro-error = "1.0.4"
|
||||
proc-macro2 = "1.0.50"
|
||||
quote = "1.0.23"
|
||||
syn = {version = "1.0.107", features = ["extra-traits", "full"]}
|
||||
proc-macro-crate = "1.3.0"
|
||||
|
||||
[features]
|
||||
interrupt = []
|
||||
riscv = []
|
||||
rtc_slow = []
|
||||
xtensa = []
|
||||
esp32 = []
|
||||
esp32c2 = []
|
||||
esp32c3 = []
|
||||
esp32s2 = []
|
||||
esp32s3 = []
|
||||
|
||||
@ -134,6 +134,8 @@ pub fn ram(args: TokenStream, input: TokenStream) -> TokenStream {
|
||||
#[cfg(feature = "interrupt")]
|
||||
#[proc_macro_attribute]
|
||||
pub fn interrupt(args: TokenStream, input: TokenStream) -> TokenStream {
|
||||
use proc_macro_crate::{crate_name, FoundCrate};
|
||||
|
||||
let mut f: ItemFn = syn::parse(input).expect("`#[interrupt]` must be applied to a function");
|
||||
|
||||
let attr_args = parse_macro_input!(args as AttributeArgs);
|
||||
@ -200,10 +202,46 @@ pub fn interrupt(args: TokenStream, input: TokenStream) -> TokenStream {
|
||||
&format!("__esp_hal_internal_{}", f.sig.ident),
|
||||
proc_macro2::Span::call_site(),
|
||||
);
|
||||
|
||||
#[cfg(feature = "esp32")]
|
||||
let hal_crate = crate_name("esp32-hal");
|
||||
#[cfg(feature = "esp32s2")]
|
||||
let hal_crate = crate_name("esp32s2-hal");
|
||||
#[cfg(feature = "esp32s3")]
|
||||
let hal_crate = crate_name("esp32s3-hal");
|
||||
#[cfg(feature = "esp32c2")]
|
||||
let hal_crate = crate_name("esp32c2-hal");
|
||||
#[cfg(feature = "esp32c3")]
|
||||
let hal_crate = crate_name("esp32c3-hal");
|
||||
|
||||
#[cfg(feature = "esp32")]
|
||||
let hal_crate_name = Ident::new("esp32_hal", Span::call_site().into());
|
||||
#[cfg(feature = "esp32s2")]
|
||||
let hal_crate_name = Ident::new("esp32s2_hal", Span::call_site().into());
|
||||
#[cfg(feature = "esp32s3")]
|
||||
let hal_crate_name = Ident::new("esp32s3_hal", Span::call_site().into());
|
||||
#[cfg(feature = "esp32c2")]
|
||||
let hal_crate_name = Ident::new("esp32c2_hal", Span::call_site().into());
|
||||
#[cfg(feature = "esp32c3")]
|
||||
let hal_crate_name = Ident::new("esp32c3_hal", Span::call_site().into());
|
||||
|
||||
let interrupt_in_hal_crate = match hal_crate {
|
||||
Ok(FoundCrate::Itself) => {
|
||||
quote!( #hal_crate_name::peripherals::Interrupt::#ident_s )
|
||||
}
|
||||
Ok(FoundCrate::Name(ref name)) => {
|
||||
let ident = Ident::new(&name, Span::call_site().into());
|
||||
quote!( #ident::peripherals::Interrupt::#ident_s )
|
||||
}
|
||||
Err(_) => {
|
||||
quote!( crate::peripherals::Interrupt::#ident_s )
|
||||
}
|
||||
};
|
||||
|
||||
f.block.stmts.extend(std::iter::once(
|
||||
syn::parse2(quote! {{
|
||||
// Check that this interrupt actually exists
|
||||
crate::peripherals::Interrupt::#ident_s;
|
||||
#interrupt_in_hal_crate;
|
||||
}})
|
||||
.unwrap(),
|
||||
));
|
||||
@ -218,25 +256,34 @@ pub fn interrupt(args: TokenStream, input: TokenStream) -> TokenStream {
|
||||
|
||||
let export_name = ident_s.to_string();
|
||||
|
||||
#[cfg(feature = "xtensa")]
|
||||
let context = quote! {
|
||||
xtensa_lx_rt::exception::Context
|
||||
};
|
||||
|
||||
#[cfg(feature = "riscv")]
|
||||
let context = quote! {
|
||||
crate::interrupt::TrapFrame
|
||||
let trap_frame_in_hal_crate = match hal_crate {
|
||||
Ok(FoundCrate::Itself) => {
|
||||
quote!(#hal_crate_name::trapframe::TrapFrame)
|
||||
}
|
||||
Ok(FoundCrate::Name(ref name)) => {
|
||||
let ident = Ident::new(&name, Span::call_site().into());
|
||||
quote!( #ident::trapframe::TrapFrame )
|
||||
}
|
||||
Err(_) => {
|
||||
quote!(crate::trapframe::TrapFrame)
|
||||
}
|
||||
};
|
||||
|
||||
let context_call =
|
||||
(f.sig.inputs.len() == 1).then(|| Ident::new("context", proc_macro2::Span::call_site()));
|
||||
|
||||
quote!(
|
||||
macro_rules! foo {
|
||||
() => {
|
||||
};
|
||||
}
|
||||
foo!();
|
||||
|
||||
#(#cfgs)*
|
||||
#(#attrs)*
|
||||
#[doc(hidden)]
|
||||
#[export_name = #export_name]
|
||||
pub unsafe extern "C" fn #tramp_ident(context: &mut #context) {
|
||||
pub unsafe extern "C" fn #tramp_ident(context: &mut #trap_frame_in_hal_crate) {
|
||||
#ident(
|
||||
#context_call
|
||||
)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "esp32-hal"
|
||||
version = "0.8.0"
|
||||
version = "0.9.0"
|
||||
authors = [
|
||||
"Jesse Braham <jesse@beta7.io>",
|
||||
"Björn Quentin <bjoern.quentin@mobile-j.de>",
|
||||
@ -30,15 +30,13 @@ embedded-hal = { version = "0.2.7", features = ["unproven"] }
|
||||
embedded-hal-1 = { version = "=1.0.0-alpha.9", optional = true, package = "embedded-hal" }
|
||||
embedded-hal-async = { version = "0.2.0-alpha.0", optional = true }
|
||||
embedded-hal-nb = { version = "=1.0.0-alpha.1", optional = true }
|
||||
esp-hal-common = { version = "0.5.0", features = ["esp32"], path = "../esp-hal-common" }
|
||||
xtensa-lx = { version = "0.7.0", features = ["esp32"] }
|
||||
xtensa-lx-rt = { version = "0.14.0", features = ["esp32"], optional = true }
|
||||
esp-hal-common = { version = "0.6.0", features = ["esp32"], path = "../esp-hal-common" }
|
||||
|
||||
[dev-dependencies]
|
||||
critical-section = "1.1.1"
|
||||
embassy-executor = { package = "embassy-executor", git = "https://github.com/embassy-rs/embassy/", rev = "cd9a65b", features = ["nightly", "integrated-timers"] }
|
||||
embedded-graphics = "0.7.1"
|
||||
esp-backtrace = { version = "0.4.0", features = ["esp32", "panic-handler", "exception-handler", "print-uart"] }
|
||||
esp-backtrace = { version = "0.5.0", features = ["esp32", "panic-handler", "exception-handler", "print-uart"] }
|
||||
esp-println = { version = "0.3.1", features = ["esp32"] }
|
||||
sha2 = { version = "0.10.6", default-features = false}
|
||||
smart-leds = "0.3.0"
|
||||
@ -50,7 +48,7 @@ aes = "0.8.2"
|
||||
default = ["rt", "vectored"]
|
||||
bluetooth = []
|
||||
eh1 = ["esp-hal-common/eh1", "dep:embedded-hal-1", "dep:embedded-hal-nb"]
|
||||
rt = ["xtensa-lx-rt/esp32"]
|
||||
rt = []
|
||||
smartled = ["esp-hal-common/smartled"]
|
||||
ufmt = ["esp-hal-common/ufmt"]
|
||||
vectored = ["esp-hal-common/vectored"]
|
||||
|
||||
@ -17,7 +17,6 @@ use esp32_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use xtensa_lx_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -23,7 +23,6 @@ use esp32_hal::{
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use nb::block;
|
||||
use xtensa_lx_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -10,12 +10,13 @@ use esp32_hal::{
|
||||
peripherals::Peripherals,
|
||||
prelude::*,
|
||||
timer::TimerGroup,
|
||||
xtensa_lx,
|
||||
Rtc,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
|
||||
#[xtensa_lx_rt::entry]
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
let peripherals = Peripherals::take();
|
||||
let mut system = peripherals.DPORT.split();
|
||||
|
||||
@ -15,7 +15,6 @@ use esp32_hal::{
|
||||
Rtc,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use xtensa_lx_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -15,7 +15,6 @@ use esp32_hal::{
|
||||
Rtc,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use xtensa_lx_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -16,7 +16,6 @@ use esp32_hal::{
|
||||
Rtc,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use xtensa_lx_rt::entry;
|
||||
|
||||
static RTC: Mutex<RefCell<Option<Rtc>>> = Mutex::new(RefCell::new(None));
|
||||
|
||||
|
||||
@ -16,7 +16,6 @@ use esp32_hal::{
|
||||
Rtc,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use xtensa_lx_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -38,7 +38,7 @@ async fn run2() {
|
||||
|
||||
static EXECUTOR: StaticCell<Executor> = StaticCell::new();
|
||||
|
||||
#[xtensa_lx_rt::entry]
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
esp_println::println!("Init!");
|
||||
let peripherals = Peripherals::take();
|
||||
|
||||
@ -57,7 +57,7 @@ async fn spi_task(spi: &'static mut SpiType<'static>) {
|
||||
|
||||
static EXECUTOR: StaticCell<Executor> = StaticCell::new();
|
||||
|
||||
#[xtensa_lx_rt::entry]
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
esp_println::println!("Init!");
|
||||
let peripherals = Peripherals::take();
|
||||
|
||||
@ -34,7 +34,7 @@ async fn ping(mut pin: Gpio0<Input<PullDown>>) {
|
||||
|
||||
static EXECUTOR: StaticCell<Executor> = StaticCell::new();
|
||||
|
||||
#[xtensa_lx_rt::entry]
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
esp_println::println!("Init!");
|
||||
let peripherals = Peripherals::take();
|
||||
|
||||
@ -17,11 +17,11 @@ use esp32_hal::{
|
||||
peripherals::{self, Peripherals},
|
||||
prelude::*,
|
||||
timer::TimerGroup,
|
||||
xtensa_lx,
|
||||
Delay,
|
||||
Rtc,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use xtensa_lx_rt::entry;
|
||||
|
||||
static BUTTON: Mutex<RefCell<Option<Gpio0<Input<PullDown>>>>> = Mutex::new(RefCell::new(None));
|
||||
|
||||
|
||||
@ -32,7 +32,6 @@ use smart_leds::{
|
||||
hsv::{hsv2rgb, Hsv},
|
||||
SmartLedsWrite,
|
||||
};
|
||||
use xtensa_lx_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -16,7 +16,6 @@ use esp32_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use nb::block;
|
||||
use xtensa_lx_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -20,7 +20,6 @@ use esp32_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use xtensa_lx_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -31,7 +31,6 @@ use esp32_hal::{
|
||||
use esp_backtrace as _;
|
||||
use nb::block;
|
||||
use ssd1306::{prelude::*, I2CDisplayInterface, Ssd1306};
|
||||
use xtensa_lx_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -26,7 +26,6 @@ use esp32_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use xtensa_lx_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -41,7 +41,6 @@ use esp32_hal::{
|
||||
IO,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use xtensa_lx_rt::entry;
|
||||
|
||||
const SINE: [i16; 64] = [
|
||||
0, 3211, 6392, 9511, 12539, 15446, 18204, 20787, 23169, 25329, 27244, 28897, 30272, 31356,
|
||||
|
||||
@ -21,7 +21,6 @@ use esp32_hal::{
|
||||
Rtc,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use xtensa_lx_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -16,7 +16,6 @@ use esp32_hal::{
|
||||
Rtc,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use xtensa_lx_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -19,7 +19,6 @@ use esp32_hal::{
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use nb::block;
|
||||
use xtensa_lx_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -28,7 +28,6 @@ use esp_hal::{
|
||||
IO,
|
||||
};
|
||||
use esp_println::println;
|
||||
use xtensa_lx_rt::entry;
|
||||
|
||||
static UNIT0: Mutex<RefCell<Option<unit::Unit>>> = Mutex::new(RefCell::new(None));
|
||||
static VALUE: AtomicI32 = AtomicI32::new(0);
|
||||
|
||||
@ -16,7 +16,6 @@ use esp32_hal::{
|
||||
Rtc,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use xtensa_lx_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -18,7 +18,6 @@ use esp32_hal::{
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use nb::block;
|
||||
use xtensa_lx_rt::entry;
|
||||
|
||||
#[ram(rtc_fast)]
|
||||
static mut SOME_INITED_DATA: [u8; 2] = [0xaa, 0xbb];
|
||||
|
||||
@ -14,7 +14,6 @@ use esp32_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use xtensa_lx_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -18,7 +18,6 @@ use esp32_hal::{
|
||||
Rwdt,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use xtensa_lx_rt::entry;
|
||||
|
||||
static RWDT: Mutex<RefCell<Option<Rwdt>>> = Mutex::new(RefCell::new(None));
|
||||
|
||||
|
||||
@ -20,7 +20,6 @@ use esp32_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use nb::block;
|
||||
use xtensa_lx_rt::entry;
|
||||
|
||||
static SERIAL: Mutex<RefCell<Option<Uart<UART0>>>> = Mutex::new(RefCell::new(None));
|
||||
|
||||
|
||||
@ -10,13 +10,13 @@ use esp32_hal::{
|
||||
prelude::*,
|
||||
sha::{Sha, ShaMode},
|
||||
timer::TimerGroup,
|
||||
xtensa_lx,
|
||||
Rtc,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use nb::block;
|
||||
use sha2::{Digest, Sha512};
|
||||
use xtensa_lx_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -31,7 +31,6 @@ use esp32_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::{print, println};
|
||||
use xtensa_lx_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -29,7 +29,6 @@ use esp32_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::{print, println};
|
||||
use xtensa_lx_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -28,7 +28,6 @@ use esp32_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use xtensa_lx_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -30,7 +30,6 @@ use esp32_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use xtensa_lx_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -18,7 +18,6 @@ use esp32_hal::{
|
||||
Rtc,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use xtensa_lx_rt::entry;
|
||||
|
||||
static TIMER00: Mutex<RefCell<Option<Timer<Timer0<TIMG0>>>>> = Mutex::new(RefCell::new(None));
|
||||
static TIMER01: Mutex<RefCell<Option<Timer<Timer1<TIMG0>>>>> = Mutex::new(RefCell::new(None));
|
||||
|
||||
@ -15,7 +15,6 @@ use esp32_hal::{
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use nb::block;
|
||||
use xtensa_lx_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -13,6 +13,7 @@ pub use esp_hal_common::{
|
||||
dma,
|
||||
dma::pdma,
|
||||
efuse,
|
||||
entry,
|
||||
gpio,
|
||||
i2c,
|
||||
i2s,
|
||||
@ -28,8 +29,10 @@ pub use esp_hal_common::{
|
||||
spi,
|
||||
system,
|
||||
timer,
|
||||
trapframe,
|
||||
uart,
|
||||
utils,
|
||||
xtensa_lx,
|
||||
Cpu,
|
||||
Delay,
|
||||
PulseControl,
|
||||
@ -74,17 +77,17 @@ pub unsafe extern "C" fn ESP32Reset() -> ! {
|
||||
}
|
||||
|
||||
// set stack pointer to end of memory: no need to retain stack up to this point
|
||||
xtensa_lx::set_stack_pointer(&mut _stack_end_cpu0);
|
||||
esp_hal_common::xtensa_lx::set_stack_pointer(&mut _stack_end_cpu0);
|
||||
|
||||
// copying data from flash to various data segments is done by the bootloader
|
||||
// initialization to zero needs to be done by the application
|
||||
|
||||
// Initialize RTC RAM
|
||||
xtensa_lx_rt::zero_bss(&mut _rtc_fast_bss_start, &mut _rtc_fast_bss_end);
|
||||
xtensa_lx_rt::zero_bss(&mut _rtc_slow_bss_start, &mut _rtc_slow_bss_end);
|
||||
esp_hal_common::xtensa_lx_rt::zero_bss(&mut _rtc_fast_bss_start, &mut _rtc_fast_bss_end);
|
||||
esp_hal_common::xtensa_lx_rt::zero_bss(&mut _rtc_slow_bss_start, &mut _rtc_slow_bss_end);
|
||||
|
||||
// continue with default reset handler
|
||||
xtensa_lx_rt::Reset();
|
||||
esp_hal_common::xtensa_lx_rt::Reset();
|
||||
}
|
||||
|
||||
/// The ESP32 has a first stage bootloader that handles loading program data
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "esp32c2-hal"
|
||||
version = "0.3.0"
|
||||
version = "0.4.0"
|
||||
authors = [
|
||||
"Jesse Braham <jesse@beta7.io>",
|
||||
"Björn Quentin <bjoern.quentin@mobile-j.de>",
|
||||
@ -30,15 +30,14 @@ embedded-hal = { version = "0.2.7", features = ["unproven"] }
|
||||
embedded-hal-1 = { version = "=1.0.0-alpha.9", optional = true, package = "embedded-hal" }
|
||||
embedded-hal-async = { version = "0.2.0-alpha.0", optional = true }
|
||||
embedded-hal-nb = { version = "=1.0.0-alpha.1", optional = true }
|
||||
esp-hal-common = { version = "0.5.0", features = ["esp32c2"], path = "../esp-hal-common" }
|
||||
esp-riscv-rt = { version = "0.1.0", optional = true }
|
||||
esp-hal-common = { version = "0.6.0", features = ["esp32c2"], path = "../esp-hal-common" }
|
||||
r0 = "1.0.0"
|
||||
|
||||
[dev-dependencies]
|
||||
critical-section = "1.1.1"
|
||||
embassy-executor = { package = "embassy-executor", git = "https://github.com/embassy-rs/embassy/", rev = "cd9a65b", features = ["nightly", "integrated-timers"] }
|
||||
embedded-graphics = "0.7.1"
|
||||
esp-backtrace = { version = "0.4.0", features = ["esp32c2", "panic-handler", "exception-handler", "print-uart"] }
|
||||
esp-backtrace = { version = "0.5.0", features = ["esp32c2", "panic-handler", "exception-handler", "print-uart"] }
|
||||
esp-println = { version = "0.3.1", features = ["esp32c2"] }
|
||||
sha2 = { version = "0.10.6", default-features = false}
|
||||
ssd1306 = "0.7.1"
|
||||
@ -48,7 +47,7 @@ static_cell = "1.0.0"
|
||||
default = ["rt", "vectored", "xtal40mhz"]
|
||||
direct-boot = []
|
||||
eh1 = ["esp-hal-common/eh1", "dep:embedded-hal-1", "dep:embedded-hal-nb"]
|
||||
rt = ["esp-riscv-rt"]
|
||||
rt = []
|
||||
ufmt = ["esp-hal-common/ufmt"]
|
||||
vectored = ["esp-hal-common/vectored"]
|
||||
async = ["esp-hal-common/async", "embedded-hal-async"]
|
||||
|
||||
@ -17,7 +17,6 @@ use esp32c2_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use esp_riscv_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -21,7 +21,6 @@ use esp32c2_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use esp_riscv_rt::entry;
|
||||
use nb::block;
|
||||
|
||||
#[entry]
|
||||
|
||||
@ -15,7 +15,6 @@ use esp32c2_hal::{
|
||||
Rtc,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_riscv_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -15,7 +15,6 @@ use esp32c2_hal::{
|
||||
Rtc,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_riscv_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -13,10 +13,10 @@ use esp32c2_hal::{
|
||||
interrupt,
|
||||
peripherals::{self, Peripherals},
|
||||
prelude::*,
|
||||
riscv,
|
||||
Rtc,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_riscv_rt::{entry, riscv};
|
||||
|
||||
static RTC: Mutex<RefCell<Option<Rtc>>> = Mutex::new(RefCell::new(None));
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ async fn run2() {
|
||||
|
||||
static EXECUTOR: StaticCell<Executor> = StaticCell::new();
|
||||
|
||||
#[esp_riscv_rt::entry]
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
esp_println::println!("Init!");
|
||||
let peripherals = Peripherals::take();
|
||||
|
||||
@ -57,7 +57,7 @@ async fn spi_task(spi: &'static mut SpiType<'static>) {
|
||||
|
||||
static EXECUTOR: StaticCell<Executor> = StaticCell::new();
|
||||
|
||||
#[esp_riscv_rt::entry]
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
esp_println::println!("Init!");
|
||||
let peripherals = Peripherals::take();
|
||||
|
||||
@ -34,7 +34,7 @@ async fn ping(mut pin: Gpio9<Input<PullDown>>) {
|
||||
|
||||
static EXECUTOR: StaticCell<Executor> = StaticCell::new();
|
||||
|
||||
#[esp_riscv_rt::entry]
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
esp_println::println!("Init!");
|
||||
let peripherals = Peripherals::take();
|
||||
|
||||
@ -15,12 +15,12 @@ use esp32c2_hal::{
|
||||
interrupt,
|
||||
peripherals::{self, Peripherals},
|
||||
prelude::*,
|
||||
riscv,
|
||||
timer::TimerGroup,
|
||||
Delay,
|
||||
Rtc,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_riscv_rt::{entry, riscv};
|
||||
|
||||
static BUTTON: Mutex<RefCell<Option<Gpio9<Input<PullDown>>>>> = Mutex::new(RefCell::new(None));
|
||||
|
||||
|
||||
@ -15,7 +15,6 @@ use esp32c2_hal::{
|
||||
Uart,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_riscv_rt::entry;
|
||||
use nb::block;
|
||||
|
||||
#[entry]
|
||||
|
||||
@ -20,7 +20,6 @@ use esp32c2_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use esp_riscv_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -29,7 +29,6 @@ use esp32c2_hal::{
|
||||
Rtc,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_riscv_rt::entry;
|
||||
use nb::block;
|
||||
use ssd1306::{prelude::*, I2CDisplayInterface, Ssd1306};
|
||||
|
||||
|
||||
@ -22,7 +22,6 @@ use esp32c2_hal::{
|
||||
Rtc,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_riscv_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -14,7 +14,6 @@ use esp32c2_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use esp_riscv_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -14,11 +14,11 @@ use esp32c2_hal::{
|
||||
interrupt,
|
||||
peripherals::{self, Peripherals},
|
||||
prelude::*,
|
||||
riscv,
|
||||
Rtc,
|
||||
Rwdt,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_riscv_rt::{entry, riscv};
|
||||
|
||||
static RWDT: Mutex<RefCell<Option<Rwdt>>> = Mutex::new(RefCell::new(None));
|
||||
|
||||
|
||||
@ -13,6 +13,7 @@ use esp32c2_hal::{
|
||||
interrupt,
|
||||
peripherals::{self, Peripherals, UART0},
|
||||
prelude::*,
|
||||
riscv,
|
||||
timer::TimerGroup,
|
||||
uart::config::AtCmdConfig,
|
||||
Cpu,
|
||||
@ -20,7 +21,6 @@ use esp32c2_hal::{
|
||||
Uart,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_riscv_rt::{entry, riscv};
|
||||
use nb::block;
|
||||
|
||||
static SERIAL: Mutex<RefCell<Option<Uart<UART0>>>> = Mutex::new(RefCell::new(None));
|
||||
|
||||
@ -14,7 +14,6 @@ use esp32c2_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use esp_riscv_rt::entry;
|
||||
use nb::block;
|
||||
use sha2::{Digest, Sha256};
|
||||
|
||||
|
||||
@ -31,7 +31,6 @@ use esp32c2_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::{print, println};
|
||||
use esp_riscv_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -29,7 +29,6 @@ use esp32c2_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::{print, println};
|
||||
use esp_riscv_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -28,7 +28,6 @@ use esp32c2_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use esp_riscv_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -30,7 +30,6 @@ use esp32c2_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use esp_riscv_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -20,7 +20,6 @@ use esp32c2_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use esp_riscv_rt::entry;
|
||||
|
||||
static ALARM0: Mutex<RefCell<Option<Alarm<Periodic, 0>>>> = Mutex::new(RefCell::new(None));
|
||||
static ALARM1: Mutex<RefCell<Option<Alarm<Target, 1>>>> = Mutex::new(RefCell::new(None));
|
||||
|
||||
@ -12,11 +12,11 @@ use esp32c2_hal::{
|
||||
interrupt,
|
||||
peripherals::{self, Peripherals, TIMG0},
|
||||
prelude::*,
|
||||
riscv,
|
||||
timer::{Timer, Timer0, TimerGroup},
|
||||
Rtc,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_riscv_rt::{entry, riscv};
|
||||
|
||||
static TIMER0: Mutex<RefCell<Option<Timer<Timer0<TIMG0>>>>> = Mutex::new(RefCell::new(None));
|
||||
|
||||
|
||||
@ -14,7 +14,6 @@ use esp32c2_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use esp_riscv_rt::entry;
|
||||
use nb::block;
|
||||
|
||||
#[entry]
|
||||
|
||||
@ -9,6 +9,7 @@ pub use esp_hal_common::{
|
||||
clock,
|
||||
dma::{self, gdma},
|
||||
efuse,
|
||||
entry,
|
||||
gpio,
|
||||
i2c,
|
||||
interrupt,
|
||||
@ -16,11 +17,13 @@ pub use esp_hal_common::{
|
||||
macros,
|
||||
peripherals,
|
||||
prelude,
|
||||
riscv,
|
||||
sha,
|
||||
spi,
|
||||
system,
|
||||
systimer,
|
||||
timer,
|
||||
trapframe,
|
||||
uart,
|
||||
Cpu,
|
||||
Delay,
|
||||
@ -50,7 +53,7 @@ extern "C" {
|
||||
|
||||
#[cfg(feature = "direct-boot")]
|
||||
#[doc(hidden)]
|
||||
#[esp_riscv_rt::pre_init]
|
||||
#[esp_hal_common::esp_riscv_rt::pre_init]
|
||||
unsafe fn init() {
|
||||
r0::init_data(&mut _srwtext, &mut _erwtext, &_irwtext);
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "esp32c3-hal"
|
||||
version = "0.5.0"
|
||||
version = "0.6.0"
|
||||
authors = [
|
||||
"Jesse Braham <jesse@beta7.io>",
|
||||
"Björn Quentin <bjoern.quentin@mobile-j.de>",
|
||||
@ -32,8 +32,7 @@ embedded-hal-1 = { version = "=1.0.0-alpha.9", optional = true, package = "e
|
||||
embedded-hal-async = { version = "0.2.0-alpha.0", optional = true }
|
||||
embedded-hal-nb = { version = "=1.0.0-alpha.1", optional = true }
|
||||
embedded-can = { version = "0.4.1", optional = true }
|
||||
esp-hal-common = { version = "0.5.0", features = ["esp32c3"], path = "../esp-hal-common" }
|
||||
esp-riscv-rt = { version = "0.1.0", optional = true }
|
||||
esp-hal-common = { version = "0.6.0", features = ["esp32c3"], path = "../esp-hal-common" }
|
||||
r0 = "1.0.0"
|
||||
|
||||
[dev-dependencies]
|
||||
@ -41,7 +40,7 @@ aes = "0.8.2"
|
||||
critical-section = "1.1.1"
|
||||
embassy-executor = { package = "embassy-executor", git = "https://github.com/embassy-rs/embassy/", rev = "cd9a65b", features = ["nightly", "integrated-timers"] }
|
||||
embedded-graphics = "0.7.1"
|
||||
esp-backtrace = { version = "0.4.0", features = ["esp32c3", "panic-handler", "exception-handler", "print-uart"] }
|
||||
esp-backtrace = { version = "0.5.0", features = ["esp32c3", "panic-handler", "exception-handler", "print-uart"] }
|
||||
esp-println = { version = "0.3.1", features = ["esp32c3"] }
|
||||
sha2 = { version = "0.10.6", default-features = false}
|
||||
smart-leds = "0.3.0"
|
||||
@ -53,7 +52,7 @@ default = ["rt", "vectored"]
|
||||
mcu-boot = []
|
||||
direct-boot = []
|
||||
eh1 = ["esp-hal-common/eh1", "dep:embedded-hal-1", "dep:embedded-hal-nb", "dep:embedded-can"]
|
||||
rt = ["esp-riscv-rt"]
|
||||
rt = []
|
||||
smartled = ["esp-hal-common/smartled"]
|
||||
ufmt = ["esp-hal-common/ufmt"]
|
||||
vectored = ["esp-hal-common/vectored"]
|
||||
|
||||
@ -17,7 +17,6 @@ use esp32c3_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use esp_riscv_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -21,7 +21,6 @@ use esp32c3_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use esp_riscv_rt::entry;
|
||||
use nb::block;
|
||||
|
||||
#[entry]
|
||||
|
||||
@ -15,7 +15,6 @@ use esp32c3_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use esp_riscv_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -15,7 +15,6 @@ use esp32c3_hal::{
|
||||
Rtc,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_riscv_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -15,7 +15,6 @@ use esp32c3_hal::{
|
||||
Rtc,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_riscv_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -13,10 +13,10 @@ use esp32c3_hal::{
|
||||
interrupt,
|
||||
peripherals::{self, Peripherals},
|
||||
prelude::*,
|
||||
riscv,
|
||||
Rtc,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_riscv_rt::{entry, riscv};
|
||||
|
||||
static RTC: Mutex<RefCell<Option<Rtc>>> = Mutex::new(RefCell::new(None));
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ async fn run2() {
|
||||
|
||||
static EXECUTOR: StaticCell<Executor> = StaticCell::new();
|
||||
|
||||
#[esp_riscv_rt::entry]
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
esp_println::println!("Init!");
|
||||
let peripherals = Peripherals::take();
|
||||
|
||||
@ -57,7 +57,7 @@ async fn spi_task(spi: &'static mut SpiType<'static>) {
|
||||
|
||||
static EXECUTOR: StaticCell<Executor> = StaticCell::new();
|
||||
|
||||
#[esp_riscv_rt::entry]
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
esp_println::println!("Init!");
|
||||
let peripherals = Peripherals::take();
|
||||
|
||||
@ -34,7 +34,7 @@ async fn ping(mut pin: Gpio9<Input<PullDown>>) {
|
||||
|
||||
static EXECUTOR: StaticCell<Executor> = StaticCell::new();
|
||||
|
||||
#[esp_riscv_rt::entry]
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
esp_println::println!("Init!");
|
||||
let peripherals = Peripherals::take();
|
||||
|
||||
@ -15,12 +15,12 @@ use esp32c3_hal::{
|
||||
interrupt,
|
||||
peripherals::{self, Peripherals},
|
||||
prelude::*,
|
||||
riscv,
|
||||
timer::TimerGroup,
|
||||
Delay,
|
||||
Rtc,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_riscv_rt::{entry, riscv};
|
||||
|
||||
static BUTTON: Mutex<RefCell<Option<Gpio9<Input<PullDown>>>>> = Mutex::new(RefCell::new(None));
|
||||
|
||||
|
||||
@ -25,7 +25,6 @@ use esp32c3_hal::{
|
||||
};
|
||||
#[allow(unused_imports)]
|
||||
use esp_backtrace as _;
|
||||
use esp_riscv_rt::entry;
|
||||
use smart_leds::{
|
||||
brightness,
|
||||
gamma,
|
||||
|
||||
@ -15,7 +15,6 @@ use esp32c3_hal::{
|
||||
Uart,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_riscv_rt::entry;
|
||||
use nb::block;
|
||||
|
||||
#[entry]
|
||||
|
||||
@ -20,7 +20,6 @@ use esp32c3_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use esp_riscv_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -29,7 +29,6 @@ use esp32c3_hal::{
|
||||
Rtc,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_riscv_rt::entry;
|
||||
use nb::block;
|
||||
use ssd1306::{prelude::*, I2CDisplayInterface, Ssd1306};
|
||||
|
||||
|
||||
@ -27,7 +27,6 @@ use esp32c3_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use esp_riscv_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -42,7 +42,6 @@ use esp32c3_hal::{
|
||||
IO,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_riscv_rt::entry;
|
||||
|
||||
const SINE: [i16; 64] = [
|
||||
0, 3211, 6392, 9511, 12539, 15446, 18204, 20787, 23169, 25329, 27244, 28897, 30272, 31356,
|
||||
|
||||
@ -22,7 +22,6 @@ use esp32c3_hal::{
|
||||
Rtc,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_riscv_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -16,7 +16,6 @@ use esp32c3_hal::{
|
||||
Rtc,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_riscv_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -17,7 +17,6 @@ use esp32c3_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use esp_riscv_rt::entry;
|
||||
use nb::block;
|
||||
|
||||
#[ram(rtc_fast)]
|
||||
|
||||
@ -14,7 +14,6 @@ use esp32c3_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use esp_riscv_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -14,11 +14,11 @@ use esp32c3_hal::{
|
||||
interrupt,
|
||||
peripherals::{self, Peripherals},
|
||||
prelude::*,
|
||||
riscv,
|
||||
Rtc,
|
||||
Rwdt,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_riscv_rt::{entry, riscv};
|
||||
|
||||
static RWDT: Mutex<RefCell<Option<Rwdt>>> = Mutex::new(RefCell::new(None));
|
||||
|
||||
|
||||
@ -13,6 +13,7 @@ use esp32c3_hal::{
|
||||
interrupt,
|
||||
peripherals::{self, Peripherals, UART0},
|
||||
prelude::*,
|
||||
riscv,
|
||||
timer::TimerGroup,
|
||||
uart::config::AtCmdConfig,
|
||||
Cpu,
|
||||
@ -20,7 +21,6 @@ use esp32c3_hal::{
|
||||
Uart,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_riscv_rt::{entry, riscv};
|
||||
use nb::block;
|
||||
|
||||
static SERIAL: Mutex<RefCell<Option<Uart<UART0>>>> = Mutex::new(RefCell::new(None));
|
||||
|
||||
@ -14,7 +14,6 @@ use esp32c3_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use esp_riscv_rt::entry;
|
||||
use nb::block;
|
||||
use sha2::{Digest, Sha256};
|
||||
|
||||
|
||||
@ -31,7 +31,6 @@ use esp32c3_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::{print, println};
|
||||
use esp_riscv_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -29,7 +29,6 @@ use esp32c3_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::{print, println};
|
||||
use esp_riscv_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -28,7 +28,6 @@ use esp32c3_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use esp_riscv_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -30,7 +30,6 @@ use esp32c3_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use esp_riscv_rt::entry;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
|
||||
@ -20,7 +20,6 @@ use esp32c3_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use esp_riscv_rt::entry;
|
||||
|
||||
static ALARM0: Mutex<RefCell<Option<Alarm<Periodic, 0>>>> = Mutex::new(RefCell::new(None));
|
||||
static ALARM1: Mutex<RefCell<Option<Alarm<Target, 1>>>> = Mutex::new(RefCell::new(None));
|
||||
|
||||
@ -13,11 +13,11 @@ use esp32c3_hal::{
|
||||
interrupt,
|
||||
peripherals::{self, Peripherals, TIMG0, TIMG1},
|
||||
prelude::*,
|
||||
riscv,
|
||||
timer::{Timer, Timer0, TimerGroup},
|
||||
Rtc,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_riscv_rt::{entry, riscv};
|
||||
|
||||
static TIMER0: Mutex<RefCell<Option<Timer<Timer0<TIMG0>>>>> = Mutex::new(RefCell::new(None));
|
||||
static TIMER1: Mutex<RefCell<Option<Timer<Timer0<TIMG1>>>>> = Mutex::new(RefCell::new(None));
|
||||
|
||||
@ -21,7 +21,6 @@ use esp32c3_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use esp_riscv_rt::entry;
|
||||
use nb::block;
|
||||
|
||||
#[entry]
|
||||
|
||||
@ -14,13 +14,13 @@ use esp32c3_hal::{
|
||||
interrupt,
|
||||
peripherals::{self, Peripherals, USB_DEVICE},
|
||||
prelude::*,
|
||||
riscv,
|
||||
timer::TimerGroup,
|
||||
Cpu,
|
||||
Rtc,
|
||||
UsbSerialJtag,
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_riscv_rt::{entry, riscv};
|
||||
use nb::block;
|
||||
|
||||
static USB_SERIAL: Mutex<RefCell<Option<UsbSerialJtag<USB_DEVICE>>>> =
|
||||
|
||||
@ -14,7 +14,6 @@ use esp32c3_hal::{
|
||||
};
|
||||
use esp_backtrace as _;
|
||||
use esp_println::println;
|
||||
use esp_riscv_rt::entry;
|
||||
use nb::block;
|
||||
|
||||
#[entry]
|
||||
|
||||
@ -14,6 +14,7 @@ pub use esp_hal_common::{
|
||||
dma,
|
||||
dma::gdma,
|
||||
efuse,
|
||||
entry,
|
||||
gpio,
|
||||
i2c,
|
||||
i2s,
|
||||
@ -23,11 +24,13 @@ pub use esp_hal_common::{
|
||||
peripherals,
|
||||
prelude,
|
||||
pulse_control,
|
||||
riscv,
|
||||
sha,
|
||||
spi,
|
||||
system,
|
||||
systimer,
|
||||
timer,
|
||||
trapframe,
|
||||
twai,
|
||||
uart,
|
||||
utils,
|
||||
@ -125,7 +128,7 @@ static ENTRY_POINT: unsafe fn() -> ! = start_hal;
|
||||
|
||||
#[cfg(feature = "direct-boot")]
|
||||
#[doc(hidden)]
|
||||
#[esp_riscv_rt::pre_init]
|
||||
#[esp_hal_common::esp_riscv_rt::pre_init]
|
||||
unsafe fn init() {
|
||||
r0::init_data(&mut _srwtext, &mut _erwtext, &_irwtext);
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user