audiomot-hid-rs

a rust library for interfacing with AudioMoth devices over USB

OpenAcousticDevices/AudioMoth-HID

Usage

```rust use audiomoth-hid-rs; fn main(){ //创建一个设备链接具柄 let audio = audiomothhidrs::AudioMothDevice::new().unwrap(); //读取设备当前配置时间 let devicetime = audio.gettime().unwrap(); println!("Time:{:?}",devicetime); //读取设备ID let deviceid = audio.getid().unwrap(); println!("DeviceId:{:?}",deviceid); //获取固件版本号 let firmwareversion = audio.getfirmwareversion().unwrap(); println!("FirmwareVersion:{:?}",firmwareversion); //获取设备固件说明 let firmwaredescription = audio.getfirmwaredescription().unwrap(); println!("FirmwareDescription:{:?}",firmwaredescription); //获取电池情况 let firmwarebattery = audio.getbattery().unwrap(); println!("FirmwareBattery:{:?}",firmwarebattery); //读取固件所有配置信息 let packet = audio.getpacket().unwrap(); println!("Packet:{:?}",packet); }

```