fw: re-enable socket (doesn't work though)

This commit is contained in:
David Lenfesty 2023-06-03 18:23:06 -06:00
parent 64fb1fd3a6
commit b0040d8699

View File

@ -101,11 +101,11 @@ fn main() -> ! {
let mut socket_storage = [SocketStorage::EMPTY; 4];
let mut socket_set = SocketSet::new(&mut socket_storage[..]);
//let mut tx_storage = [0u8; 128];
//let mut rx_storage = [0u8; 128];
//let mut tx_buf = SocketBuffer::new(&mut tx_storage[..]);
//let mut rx_buf = SocketBuffer::new(&mut rx_storage[..]);
//let mut command_socket = socket_set.add(TcpSocket::new(tx_buf, rx_buf));
let mut tx_storage = [0u8; 128];
let mut rx_storage = [0u8; 128];
let mut tx_buf = SocketBuffer::new(&mut tx_storage[..]);
let mut rx_buf = SocketBuffer::new(&mut rx_storage[..]);
let mut command_socket = socket_set.add(TcpSocket::new(tx_buf, rx_buf));
let mut last_blink: u32 = 0;
@ -130,7 +130,7 @@ fn main() -> ! {
//write_reg(0xf000_381c, 1u32);
}
//let mut cmd = command_interface::CommandInterface::new();
let mut cmd = command_interface::CommandInterface::new();
loop {
let now = millis();
@ -144,7 +144,7 @@ fn main() -> ! {
}
if iface.poll(Instant::from_millis(now), &mut device, &mut socket_set) {
//cmd.run(socket_set.get_mut(command_socket));
cmd.run(socket_set.get_mut(command_socket));
}
handle_timer_event();