]> git.proxmox.com Git - rustc.git/blame - vendor/windows-sys/src/Windows/Devices/Gpio/mod.rs
New upstream version 1.66.0+dfsg1
[rustc.git] / vendor / windows-sys / src / Windows / Devices / Gpio / mod.rs
CommitLineData
5e7ed085
FG
1#[cfg(feature = "Devices_Gpio_Provider")]
2pub mod Provider;
3#[repr(C)]
04454e1e 4#[doc = "*Required features: `\"Devices_Gpio\"`, `\"Foundation\"`*"]
5e7ed085
FG
5#[cfg(feature = "Foundation")]
6pub struct GpioChangeCount {
7 pub Count: u64,
8 pub RelativeTime: super::super::Foundation::TimeSpan,
9}
10#[cfg(feature = "Foundation")]
11impl ::core::marker::Copy for GpioChangeCount {}
12#[cfg(feature = "Foundation")]
13impl ::core::clone::Clone for GpioChangeCount {
14 fn clone(&self) -> Self {
15 *self
16 }
17}
18pub type GpioChangeCounter = *mut ::core::ffi::c_void;
04454e1e 19#[doc = "*Required features: `\"Devices_Gpio\"`*"]
5e7ed085
FG
20#[repr(transparent)]
21pub struct GpioChangePolarity(pub i32);
22impl GpioChangePolarity {
23 pub const Falling: Self = Self(0i32);
24 pub const Rising: Self = Self(1i32);
25 pub const Both: Self = Self(2i32);
26}
27impl ::core::marker::Copy for GpioChangePolarity {}
28impl ::core::clone::Clone for GpioChangePolarity {
29 fn clone(&self) -> Self {
30 *self
31 }
32}
33pub type GpioChangeReader = *mut ::core::ffi::c_void;
34#[repr(C)]
04454e1e 35#[doc = "*Required features: `\"Devices_Gpio\"`, `\"Foundation\"`*"]
5e7ed085
FG
36#[cfg(feature = "Foundation")]
37pub struct GpioChangeRecord {
38 pub RelativeTime: super::super::Foundation::TimeSpan,
39 pub Edge: GpioPinEdge,
40}
41#[cfg(feature = "Foundation")]
42impl ::core::marker::Copy for GpioChangeRecord {}
43#[cfg(feature = "Foundation")]
44impl ::core::clone::Clone for GpioChangeRecord {
45 fn clone(&self) -> Self {
46 *self
47 }
48}
49pub type GpioController = *mut ::core::ffi::c_void;
04454e1e 50#[doc = "*Required features: `\"Devices_Gpio\"`*"]
5e7ed085
FG
51#[repr(transparent)]
52pub struct GpioOpenStatus(pub i32);
53impl GpioOpenStatus {
54 pub const PinOpened: Self = Self(0i32);
55 pub const PinUnavailable: Self = Self(1i32);
56 pub const SharingViolation: Self = Self(2i32);
57 pub const MuxingConflict: Self = Self(3i32);
58 pub const UnknownError: Self = Self(4i32);
59}
60impl ::core::marker::Copy for GpioOpenStatus {}
61impl ::core::clone::Clone for GpioOpenStatus {
62 fn clone(&self) -> Self {
63 *self
64 }
65}
66pub type GpioPin = *mut ::core::ffi::c_void;
04454e1e 67#[doc = "*Required features: `\"Devices_Gpio\"`*"]
5e7ed085
FG
68#[repr(transparent)]
69pub struct GpioPinDriveMode(pub i32);
70impl GpioPinDriveMode {
71 pub const Input: Self = Self(0i32);
72 pub const Output: Self = Self(1i32);
73 pub const InputPullUp: Self = Self(2i32);
74 pub const InputPullDown: Self = Self(3i32);
75 pub const OutputOpenDrain: Self = Self(4i32);
76 pub const OutputOpenDrainPullUp: Self = Self(5i32);
77 pub const OutputOpenSource: Self = Self(6i32);
78 pub const OutputOpenSourcePullDown: Self = Self(7i32);
79}
80impl ::core::marker::Copy for GpioPinDriveMode {}
81impl ::core::clone::Clone for GpioPinDriveMode {
82 fn clone(&self) -> Self {
83 *self
84 }
85}
04454e1e 86#[doc = "*Required features: `\"Devices_Gpio\"`*"]
5e7ed085
FG
87#[repr(transparent)]
88pub struct GpioPinEdge(pub i32);
89impl GpioPinEdge {
90 pub const FallingEdge: Self = Self(0i32);
91 pub const RisingEdge: Self = Self(1i32);
92}
93impl ::core::marker::Copy for GpioPinEdge {}
94impl ::core::clone::Clone for GpioPinEdge {
95 fn clone(&self) -> Self {
96 *self
97 }
98}
04454e1e 99#[doc = "*Required features: `\"Devices_Gpio\"`*"]
5e7ed085
FG
100#[repr(transparent)]
101pub struct GpioPinValue(pub i32);
102impl GpioPinValue {
103 pub const Low: Self = Self(0i32);
104 pub const High: Self = Self(1i32);
105}
106impl ::core::marker::Copy for GpioPinValue {}
107impl ::core::clone::Clone for GpioPinValue {
108 fn clone(&self) -> Self {
109 *self
110 }
111}
112pub type GpioPinValueChangedEventArgs = *mut ::core::ffi::c_void;
04454e1e 113#[doc = "*Required features: `\"Devices_Gpio\"`*"]
5e7ed085
FG
114#[repr(transparent)]
115pub struct GpioSharingMode(pub i32);
116impl GpioSharingMode {
117 pub const Exclusive: Self = Self(0i32);
118 pub const SharedReadOnly: Self = Self(1i32);
119}
120impl ::core::marker::Copy for GpioSharingMode {}
121impl ::core::clone::Clone for GpioSharingMode {
122 fn clone(&self) -> Self {
123 *self
124 }
125}