Improve mod & struct visibility & hierarchy #10
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix-visibility"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR will change the visibility of mods and structs. The following items will be hidden from external access:
spi
(exceptspi::interfaces
) - the SPI driver is intended for the ENC424J600 driver only.rx
(exceptrx::RxPacket
) - the buffer is to be controlled by the ENC424J600 driver only.tx
(excepttx::TxPacket
) - ditto.The following selected items will be exposed for access with aliases:
spi::interfaces
→SpiInterfaces
- it contains specific settings for SPI as recommended by the datasheet, which are good default settings but not mandatory.rx::RxPacket
→RxPacket
- it is the type returned from the public functionEnc424j600::recv_packet()
, which is crucial for non-smoltcp applications.tx::TxPacket
→TxPacket
- it describes the packet to send with the public functionEnc424j600::send_packet()
, also crucial for non-smoltcp applications.smoltcp_phy::SmoltcpDevice
→SmoltcpDevice
- this struct is the only item within thesmoltcp_phy
mod, and crucial for smoltcp applications.Any comments are welcome. Thanks!
c8e2024be1
to39d86ac98c
39d86ac98c
to41ea7c3b3f
Checkout
From your project repository, check out a new branch and test the changes.