Hide {spi,rx,tx} except {spi::interfaces,rx::RxPacket,tx::TxPacket}
This commit is contained in:
parent
512fd154bd
commit
272e21c787
10
src/lib.rs
10
src/lib.rs
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue