()
| 248 | } |
| 249 | |
| 250 | pub fn print_fw_ver() -> Option<()> { |
| 251 | for skip in 0..5 { |
| 252 | if let Some(device) = HidapiTouchScreen::open_device(0x000D, skip) { |
| 253 | if device.get_stylus_fw().is_some() { |
| 254 | break; |
| 255 | } |
| 256 | } |
| 257 | } |
| 258 | |
| 259 | if print_himax_fw_ver().is_some() { |
| 260 | return Some(()); |
| 261 | } |
| 262 | |
| 263 | #[cfg(target_os = "windows")] |
| 264 | let device = touchscreen_win::NativeWinTouchScreen::open_device(VENDOR_USAGE_PAGE, 0)?; |
| 265 | #[cfg(not(target_os = "windows"))] |
| 266 | let device = HidapiTouchScreen::open_device(VENDOR_USAGE_PAGE, 0)?; |
| 267 | |
| 268 | device.check_fw_version() |
| 269 | } |
| 270 | |
| 271 | pub fn print_himax_fw_ver() -> Option<()> { |
| 272 | let api = match HidApi::new() { |
no test coverage detected