Skip to main content

axplat_dyn/
lib.rs

1#![no_std]
2#![cfg(not(any(windows, unix)))]
3#![feature(used_with_arg)]
4
5extern crate alloc;
6extern crate somehal;
7
8#[macro_use]
9extern crate ax_plat;
10#[allow(unused_imports)]
11#[macro_use]
12extern crate log;
13
14mod boot;
15mod console;
16pub mod drivers;
17mod generic_timer;
18mod init;
19#[cfg(feature = "irq")]
20mod irq;
21mod mem;
22mod power;
23#[cfg(feature = "rknpu")]
24pub mod rknpu;
25
26#[cfg(not(feature = "irq"))]
27#[somehal::irq_handler]
28fn somehal_handle_irq(_irq: somehal::irq::IrqId) {}
29
30// pub mod config {
31//     //! Platform configuration module.
32//     //!
33//     //! If the `AX_CONFIG_PATH` environment variable is set, it will load the configuration from the specified path.
34//     //! Otherwise, it will fall back to the `axconfig.toml` file in the current directory and generate the default configuration.
35//     //!
36//     //! If the `PACKAGE` field in the configuration does not match the package name, it will panic with an error message.
37//     ax_config_macros::include_configs!(path_env = "AX_CONFIG_PATH", fallback = "axconfig.toml");
38//     assert_str_eq!(
39//         PACKAGE,
40//         env!("CARGO_PKG_NAME"),
41//         "`PACKAGE` field in the configuration does not match the Package name. Please check your configuration file."
42//     );
43// }