Minor typo fixes, clean-up of the public interface
This commit is contained in:
parent
ca8268ab31
commit
a3e0911c5b
8 changed files with 17 additions and 11 deletions
|
|
@ -28,7 +28,7 @@ impl<E> From<E> for ResetError<E> {
|
|||
}
|
||||
|
||||
impl<SpiBus: Bus, HostImpl: Host> Device<SpiBus, HostImpl> {
|
||||
pub fn new(bus: SpiBus, host: HostImpl) -> Self {
|
||||
pub(crate) fn new(bus: SpiBus, host: HostImpl) -> Self {
|
||||
Device {
|
||||
bus,
|
||||
host,
|
||||
|
|
@ -53,7 +53,7 @@ impl<SpiBus: Bus, HostImpl: Host> Device<SpiBus, HostImpl> {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn take_socket(&mut self) -> Option<Socket> {
|
||||
pub(crate) fn take_socket(&mut self) -> Option<Socket> {
|
||||
// TODO maybe return Future that resolves when release_socket invoked
|
||||
for index in 0..8 {
|
||||
if self.sockets.get_bit(index) {
|
||||
|
|
@ -71,7 +71,7 @@ impl<SpiBus: Bus, HostImpl: Host> Device<SpiBus, HostImpl> {
|
|||
Ok(phy[0].into())
|
||||
}
|
||||
|
||||
pub fn release_socket(&mut self, socket: Socket) {
|
||||
pub(crate) fn release_socket(&mut self, socket: Socket) {
|
||||
self.sockets.set_bit(socket.index.into(), true);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue