Add missing SPDX identifiers

This commit is contained in:
Tim Crawford
2021-02-22 13:11:55 -07:00
committed by Jeremy Soller
parent 3e742b0da7
commit 3e154d7f00
19 changed files with 40 additions and 4 deletions

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT
use hidapi::HidDevice;
use crate::{

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT
use hwio::{Io, Pio};
use crate::{

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT
use std::{
fs,
io::{

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT
const SMFI_CMD_BASE: u16 = 0xE00;
const SMFI_CMD_SIZE: usize = 0x100;

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT
use std::{
io,
net::UdpSocket,
@ -40,7 +42,7 @@ impl AccessLpcSim {
"Socket request incorrect size"
));
}
let mut response = [0];
if self.socket.recv(&mut response)? != response.len() {
return Err(io::Error::new(
@ -48,14 +50,14 @@ impl AccessLpcSim {
"Socket response incorrect size"
));
}
Ok(response[0])
}
pub fn inb(&mut self, addr: u16) -> Result<u8, Error> {
Ok(self.transaction(0x01, addr, 0)?)
}
pub fn outb(&mut self, addr: u16, value: u8) -> Result<(), Error> {
self.transaction(0x02, addr, value)?;
Ok(())

View File

@ -1,3 +1,5 @@
// SPDX-License-Identifier: MIT
use crate::Error;
use downcast_rs::Downcast;