@@ -19,23 +19,23 @@ pub enum TxError {
19
19
20
20
/// Tx DMA state
21
21
pub struct TxRing < ' a > {
22
- pub ( crate ) entries : & ' a mut [ TxRingEntry ] ,
22
+ entries : & ' a mut [ TxRingEntry ] ,
23
23
next_entry : usize ,
24
24
}
25
25
26
26
impl < ' ring > TxRing < ' ring > {
27
27
/// Allocate
28
28
///
29
29
/// `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 {
31
31
TxRing {
32
32
entries,
33
33
next_entry : 0 ,
34
34
}
35
35
}
36
36
37
37
/// 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 ) {
39
39
// Setup ring
40
40
{
41
41
let mut previous: Option < & mut TxRingEntry > = None ;
@@ -153,7 +153,7 @@ impl<'ring> TxRing<'ring> {
153
153
154
154
/// Demand that the DMA engine polls the current `TxDescriptor`
155
155
/// (when we just transferred ownership to the hardware).
156
- pub fn demand_poll ( & self ) {
156
+ pub ( crate ) fn demand_poll ( & self ) {
157
157
// SAFETY: we only perform an atomic write to `dmatpdr`
158
158
let eth_dma = unsafe { & * ETHERNET_DMA :: ptr ( ) } ;
159
159
eth_dma. dmatpdr . write ( |w| {
@@ -174,7 +174,7 @@ impl<'ring> TxRing<'ring> {
174
174
self . running_state ( ) . is_running ( )
175
175
}
176
176
177
- fn running_state ( & self ) -> RunningState {
177
+ pub ( crate ) fn running_state ( & self ) -> RunningState {
178
178
// SAFETY: we only perform an atomic read of `dmasr`.
179
179
let eth_dma = unsafe { & * ETHERNET_DMA :: ptr ( ) } ;
180
180
@@ -209,7 +209,7 @@ impl TxRing<'_> {
209
209
)
210
210
}
211
211
212
- pub ( crate ) fn entry_available ( & self , index : usize ) -> bool {
212
+ fn entry_available ( & self , index : usize ) -> bool {
213
213
self . entries [ index] . is_available ( )
214
214
}
215
215
0 commit comments