usb-rfid-decoder

Crates.iousb-rfid-decoder
lib.rsusb-rfid-decoder
version0.2.1
sourcesrc
created_at2023-08-26 18:18:21.250263
updated_at2023-08-28 15:28:21.674972
descriptionA simple character decoder for USB RFID readers
homepagehttps://github.com/bitbrain-za/usb-rfid-rs
repositoryhttps://github.com/bitbrain-za/usb-rfid-rs
max_upload_size
id955652
size7,762
(bitbrain-za)

documentation

README

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());
}

References

Commit count: 7

cargo fmt