1
0
Fork 0

main: restrict eth buffers to 1 each

This commit is contained in:
Astro 2019-08-19 02:21:36 +02:00
parent 9c73cf130d
commit 4c62ce0dad
1 changed files with 6 additions and 4 deletions

View File

@ -92,11 +92,13 @@ fn main() {
println!("Eth on"); println!("Eth on");
eth.reset_phy(); eth.reset_phy();
let mut rx_descs: [eth::rx::DescEntry; 8] = unsafe { uninitialized() }; const RX_LEN: usize = 1;
let mut rx_buffers = [[0u8; 1536]; 8]; let mut rx_descs: [eth::rx::DescEntry; RX_LEN] = unsafe { uninitialized() };
let mut rx_buffers = [[0u8; eth::MTU]; RX_LEN];
const TX_LEN: usize = 1;
let mut tx_descs: [eth::tx::DescEntry; TX_LEN] = unsafe { uninitialized() };
let mut tx_buffers = [[0u8; eth::MTU]; TX_LEN];
let eth = eth.start_rx(&mut rx_descs, &mut rx_buffers); let eth = eth.start_rx(&mut rx_descs, &mut rx_buffers);
let mut tx_descs: [eth::tx::DescEntry; 8] = unsafe { uninitialized() };
let mut tx_buffers = [[0u8; 1536]; 8];
//let mut eth = eth.start_tx(&mut tx_descs, &mut tx_buffers); //let mut eth = eth.start_tx(&mut tx_descs, &mut tx_buffers);
let mut eth = eth.start_tx( let mut eth = eth.start_tx(
// HACK // HACK