Skip to content

Commit c013e26

Browse files
committed
Adjust visibility of these items
1 parent 24eb142 commit c013e26

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/dma/rx/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ pub struct RxRing<'a> {
4343

4444
impl<'a> RxRing<'a> {
4545
/// Allocate
46-
pub fn new(entries: &'a mut [RxRingEntry]) -> Self {
46+
pub(crate) fn new(entries: &'a mut [RxRingEntry]) -> Self {
4747
RxRing {
4848
entries,
4949
next_entry: 0,
5050
}
5151
}
5252

5353
/// Setup the DMA engine (**required**)
54-
pub fn start(&mut self, eth_dma: &ETHERNET_DMA) {
54+
pub(crate) fn start(&mut self, eth_dma: &ETHERNET_DMA) {
5555
// Setup ring
5656
{
5757
let mut previous: Option<&mut RxRingEntry> = None;

src/dma/tx/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,23 @@ pub enum TxError {
1919

2020
/// Tx DMA state
2121
pub struct TxRing<'a> {
22-
pub(crate) entries: &'a mut [TxRingEntry],
22+
entries: &'a mut [TxRingEntry],
2323
next_entry: usize,
2424
}
2525

2626
impl<'ring> TxRing<'ring> {
2727
/// Allocate
2828
///
2929
/// `start()` will be needed before `send()`
30-
pub fn new(entries: &'ring mut [TxRingEntry]) -> Self {
30+
pub(crate) fn new(entries: &'ring mut [TxRingEntry]) -> Self {
3131
TxRing {
3232
entries,
3333
next_entry: 0,
3434
}
3535
}
3636

3737
/// Start the Tx DMA engine
38-
pub fn start(&mut self, eth_dma: &ETHERNET_DMA) {
38+
pub(crate) fn start(&mut self, eth_dma: &ETHERNET_DMA) {
3939
// Setup ring
4040
{
4141
let mut previous: Option<&mut TxRingEntry> = None;
@@ -153,7 +153,7 @@ impl<'ring> TxRing<'ring> {
153153

154154
/// Demand that the DMA engine polls the current `TxDescriptor`
155155
/// (when we just transferred ownership to the hardware).
156-
pub fn demand_poll(&self) {
156+
pub(crate) fn demand_poll(&self) {
157157
// SAFETY: we only perform an atomic write to `dmatpdr`
158158
let eth_dma = unsafe { &*ETHERNET_DMA::ptr() };
159159
eth_dma.dmatpdr.write(|w| {
@@ -174,7 +174,7 @@ impl<'ring> TxRing<'ring> {
174174
self.running_state().is_running()
175175
}
176176

177-
fn running_state(&self) -> RunningState {
177+
pub(crate) fn running_state(&self) -> RunningState {
178178
// SAFETY: we only perform an atomic read of `dmasr`.
179179
let eth_dma = unsafe { &*ETHERNET_DMA::ptr() };
180180

@@ -209,7 +209,7 @@ impl TxRing<'_> {
209209
)
210210
}
211211

212-
pub(crate) fn entry_available(&self, index: usize) -> bool {
212+
fn entry_available(&self, index: usize) -> bool {
213213
self.entries[index].is_available()
214214
}
215215

0 commit comments

Comments
 (0)