Improve mod & struct visibility & hierarchy #10

Open
harry wants to merge 4 commits from fix-visibility into master
2 changed files with 9 additions and 3 deletions
Showing only changes of commit 272e21c787 - Show all commits

View File

@ -1,6 +1,7 @@
#![no_std]
pub mod spi;
mod spi;
pub use crate::spi::interfaces as SpiInterfaces;
use embedded_hal::{
blocking::{
spi::Transfer,
@ -9,8 +10,11 @@ use embedded_hal::{
digital::v2::OutputPin,
};
pub mod rx;
pub mod tx;
mod rx;
mod tx;
pub use crate::{
rx::RxPacket, tx::TxPacket,
};
#[cfg(feature="smoltcp")]
pub mod smoltcp_phy;

View File

@ -14,6 +14,7 @@ pub mod interfaces {
pub const SPI_CLOCK_FREQ: u32 = 14_000_000;
}
#[allow(dead_code)]
pub mod opcodes {
/// 1-byte Instructions
pub const SETETHRST: u8 = 0b1100_1010;
@ -32,6 +33,7 @@ pub mod opcodes {
pub const WGPDATA: u8 = 0b0010_1010; // 8-bit opcode followed by data
}
#[allow(dead_code)]
pub mod addrs {
/// SPI Register Mapping
/// Note: PSP interface use different address mapping