3 unstable releases
0.2.1 | Aug 28, 2023 |
---|---|
0.2.0 | Aug 26, 2023 |
0.1.0 | Aug 26, 2023 |
#1659 in Hardware support
8KB
198 lines
Overview
Simple function to parse raw hex data from something like /dev/hidraw0 and return a card number. Works from products such as this
Example
[dependencies]
usb-rfid-decoder = "0.2.0"
use usb_rfid_decoder as decoder;
fn main() {
const CARD: [u16; 11] = [
0x27, 0x27, 0x27, 0x1f, 0x22, 0x20, 0x27, 0x24, 0x25, 0x22, 0x28,
];
let result = decoder::decode(&CARD);
println!("{:?}", result.unwrap());
}