| { | ||
| "git": { | ||
| "sha1": "bbdce3d50704c0abf2ce04bc60f8aee6af254f6b" | ||
| "sha1": "3c688160f760be03ad28563defd886a4a942cceb" | ||
| } | ||
| } |
+1
-1
@@ -15,3 +15,3 @@ # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO | ||
| name = "hidapi" | ||
| version = "0.5.1" | ||
| version = "0.5.2" | ||
| authors = ["Roland Ruckerbauer <roland.rucky@gmail.com>", "Osspial <osspial@gmail.com>", "Artyom Pavlov <newpavlov@gmail.com>", "mberndt123", "niklasad1"] | ||
@@ -18,0 +18,0 @@ build = "build.rs" |
+8
-1
@@ -55,3 +55,5 @@ // ************************************************************************** | ||
| pub use error::HidError; | ||
| pub type HidResult<T> = Result<T, HidError>; | ||
| const STRING_BUF_LEN: usize = 128; | ||
@@ -65,3 +67,8 @@ | ||
| fn acquire() -> HidResult<HidApiLock> { | ||
| if HID_API_LOCK.compare_and_swap(false, true, Ordering::SeqCst) { | ||
| const EXPECTED_CURRENT: bool = false; | ||
| if EXPECTED_CURRENT == HID_API_LOCK.compare_and_swap(EXPECTED_CURRENT, | ||
| true, | ||
| Ordering::SeqCst) { | ||
| // Initialize the HID and prevent other HIDs from being created | ||
@@ -68,0 +75,0 @@ unsafe { |
Sorry, the diff of this file is not supported yet