mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-17 08:40:52 +00:00
cleanup dependencies a bit
cramium-soc i think should be deprecated everywhere because it is redundant with the board targets: anywhere you see a board target that includes the crossbar soc it should also transitively pull in the cramium-soc dependency equivalents. we'll chase this out more later, but for now we're just trying to get the PDDB to compile
This commit is contained in:
parent
5d288ec9a8
commit
fa3ab1dea1
5 changed files with 12 additions and 17 deletions
|
|
@ -44,12 +44,7 @@ critical-section = "1.1.1"
|
|||
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(ci)', 'cfg(baremetal)'] }
|
||||
|
||||
[features]
|
||||
cramium-soc = [
|
||||
"utralib/cramium-soc",
|
||||
"cramium-hal/cramium-soc",
|
||||
"rand_chacha",
|
||||
"raw-trng",
|
||||
]
|
||||
cramium-soc = ["utralib/cramium-soc", "rand_chacha", "raw-trng"]
|
||||
verilator-only = []
|
||||
cramium-fpga = ["utralib/cramium-fpga", "rand_chacha"]
|
||||
board-baosec = ["cramium-hal/kernel-baosec", "memmap-flash", "swap"]
|
||||
|
|
|
|||
|
|
@ -32,7 +32,6 @@ camera-ov2640 = []
|
|||
camera-gc2145 = []
|
||||
display-sh1107 = []
|
||||
axp2101 = []
|
||||
cramium-soc = ["utralib/cramium-soc"]
|
||||
board-baosec = [
|
||||
"camera-gc2145",
|
||||
"display-sh1107",
|
||||
|
|
@ -41,6 +40,7 @@ board-baosec = [
|
|||
"ux-api/board-baosec",
|
||||
] # USB form factor token
|
||||
loader-baosec = [
|
||||
"utralib/cramium-soc",
|
||||
"camera-gc2145",
|
||||
"display-sh1107",
|
||||
"axp2101",
|
||||
|
|
|
|||
|
|
@ -67,9 +67,9 @@ pub struct MboxToCm7Pkt<'a> {
|
|||
pub struct MboxToRvPkt {
|
||||
pub version: u32,
|
||||
pub opcode: ToRvOp,
|
||||
#[cfg(target_os = "xous")]
|
||||
#[cfg(feature = "std")]
|
||||
pub data: Vec<u32>,
|
||||
#[cfg(not(target_os = "xous"))]
|
||||
#[cfg(not(feature = "std"))]
|
||||
pub len: usize,
|
||||
}
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ pub struct Mbox {
|
|||
}
|
||||
impl Mbox {
|
||||
pub fn new() -> Mbox {
|
||||
#[cfg(target_os = "xous")]
|
||||
#[cfg(feature = "std")]
|
||||
let csr_mem = xous::syscall::map_memory(
|
||||
xous::MemoryAddress::new(mailbox::HW_MAILBOX_BASE),
|
||||
None,
|
||||
|
|
@ -86,9 +86,9 @@ impl Mbox {
|
|||
xous::MemoryFlags::R | xous::MemoryFlags::W,
|
||||
)
|
||||
.expect("couldn't map mailbox CSR range");
|
||||
#[cfg(target_os = "xous")]
|
||||
#[cfg(feature = "std")]
|
||||
let mut csr = CSR::new(csr_mem.as_mut_ptr() as *mut u32);
|
||||
#[cfg(not(target_os = "xous"))]
|
||||
#[cfg(not(feature = "std"))]
|
||||
let mut csr = CSR::new(mailbox::HW_MAILBOX_BASE as *mut u32);
|
||||
csr.wfo(mailbox::LOOPBACK_LOOPBACK, 0); // ensure we're not in loopback mode
|
||||
// generate available events - not hooked up to IRQ, but we'll poll for now
|
||||
|
|
@ -129,7 +129,7 @@ impl Mbox {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(target_os = "xous")]
|
||||
#[cfg(feature = "std")]
|
||||
pub fn try_rx(&mut self) -> Result<MboxToRvPkt, MboxError> {
|
||||
let version = self.expect_rx()?;
|
||||
let op_and_len = self.expect_rx()?;
|
||||
|
|
@ -142,7 +142,7 @@ impl Mbox {
|
|||
Ok(MboxToRvPkt { version, opcode, data })
|
||||
}
|
||||
|
||||
#[cfg(not(target_os = "xous"))]
|
||||
#[cfg(not(feature = "std"))]
|
||||
pub fn try_rx(&mut self, data: &mut [u32]) -> Result<MboxToRvPkt, MboxError> {
|
||||
let version = self.expect_rx()?;
|
||||
let op_and_len = self.expect_rx()?;
|
||||
|
|
|
|||
|
|
@ -606,14 +606,14 @@ impl Spim {
|
|||
|
||||
/// Wait for the pending tx/rx cycle to finish, returns a pointer to the Rx buffer when done.
|
||||
pub fn txrx_await(&mut self, _use_yield: bool) -> Result<&[u8], xous::Error> {
|
||||
#[cfg(not(target_os = "xous"))]
|
||||
#[cfg(not(feature = "std"))]
|
||||
if let Some(pending) = self.pending_txrx.take() {
|
||||
while self.udma_busy(Bank::Tx) || self.udma_busy(Bank::Rx) || self.udma_busy(Bank::Custom) {}
|
||||
Ok(&self.rx_buf()[..pending])
|
||||
} else {
|
||||
Err(xous::Error::UseBeforeInit)
|
||||
}
|
||||
#[cfg(target_os = "xous")]
|
||||
#[cfg(feature = "std")]
|
||||
{
|
||||
if let Some(pending) = self.pending_txrx.take() {
|
||||
let tt = xous_api_ticktimer::Ticktimer::new().unwrap();
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ renode = [
|
|||
cramium-soc = [
|
||||
"utralib/cramium-soc",
|
||||
"debug-print",
|
||||
"cramium-hal/cramium-soc",
|
||||
"cramium-hal",
|
||||
"cramium-api",
|
||||
"rand_chacha",
|
||||
"sram-margin",
|
||||
|
|
|
|||
Loading…
Reference in a new issue