// Copyright (C) 2021-2022 Robin Krahl // SPDX-License-Identifier: CC0-1.0 //! Executes the wink command on all CTAPHID devices. fn main() -> Result<(), Box> { env_logger::init(); let hidapi = hidapi::HidApi::new()?; let devices = hidapi .device_list() .filter(|device| ctaphid::is_known_device(*device)); for device_info in devices { let device = device_info.open_device(&hidapi)?; let device = ctaphid::Device::new(device, device_info.to_owned())?; device.wink()?; } Ok(()) }