Crates.io | usb-rfid-decoder |
lib.rs | usb-rfid-decoder |
version | 0.2.1 |
source | src |
created_at | 2023-08-26 18:18:21.250263 |
updated_at | 2023-08-28 15:28:21.674972 |
description | A simple character decoder for USB RFID readers |
homepage | https://github.com/bitbrain-za/usb-rfid-rs |
repository | https://github.com/bitbrain-za/usb-rfid-rs |
max_upload_size | |
id | 955652 |
size | 7,762 |
Simple function to parse raw hex data from something like /dev/hidraw0 and return a card number. Works from products such as this
[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());
}