Minor typo fixes, clean-up of the public interface

This commit is contained in:
Jonah Dahlquist 2021-02-15 21:52:35 -08:00
commit a3e0911c5b
8 changed files with 17 additions and 11 deletions

View file

@ -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);
}