]>
Commit | Line | Data |
---|---|---|
5e7ed085 FG |
1 | #[cfg(feature = "Devices_Gpio_Provider")] |
2 | pub mod Provider; | |
3 | #[repr(C)] | |
04454e1e | 4 | #[doc = "*Required features: `\"Devices_Gpio\"`, `\"Foundation\"`*"] |
5e7ed085 FG |
5 | #[cfg(feature = "Foundation")] |
6 | pub struct GpioChangeCount { | |
7 | pub Count: u64, | |
8 | pub RelativeTime: super::super::Foundation::TimeSpan, | |
9 | } | |
10 | #[cfg(feature = "Foundation")] | |
11 | impl ::core::marker::Copy for GpioChangeCount {} | |
12 | #[cfg(feature = "Foundation")] | |
13 | impl ::core::clone::Clone for GpioChangeCount { | |
14 | fn clone(&self) -> Self { | |
15 | *self | |
16 | } | |
17 | } | |
18 | pub type GpioChangeCounter = *mut ::core::ffi::c_void; | |
04454e1e | 19 | #[doc = "*Required features: `\"Devices_Gpio\"`*"] |
5e7ed085 FG |
20 | #[repr(transparent)] |
21 | pub struct GpioChangePolarity(pub i32); | |
22 | impl GpioChangePolarity { | |
23 | pub const Falling: Self = Self(0i32); | |
24 | pub const Rising: Self = Self(1i32); | |
25 | pub const Both: Self = Self(2i32); | |
26 | } | |
27 | impl ::core::marker::Copy for GpioChangePolarity {} | |
28 | impl ::core::clone::Clone for GpioChangePolarity { | |
29 | fn clone(&self) -> Self { | |
30 | *self | |
31 | } | |
32 | } | |
33 | pub type GpioChangeReader = *mut ::core::ffi::c_void; | |
34 | #[repr(C)] | |
04454e1e | 35 | #[doc = "*Required features: `\"Devices_Gpio\"`, `\"Foundation\"`*"] |
5e7ed085 FG |
36 | #[cfg(feature = "Foundation")] |
37 | pub struct GpioChangeRecord { | |
38 | pub RelativeTime: super::super::Foundation::TimeSpan, | |
39 | pub Edge: GpioPinEdge, | |
40 | } | |
41 | #[cfg(feature = "Foundation")] | |
42 | impl ::core::marker::Copy for GpioChangeRecord {} | |
43 | #[cfg(feature = "Foundation")] | |
44 | impl ::core::clone::Clone for GpioChangeRecord { | |
45 | fn clone(&self) -> Self { | |
46 | *self | |
47 | } | |
48 | } | |
49 | pub type GpioController = *mut ::core::ffi::c_void; | |
04454e1e | 50 | #[doc = "*Required features: `\"Devices_Gpio\"`*"] |
5e7ed085 FG |
51 | #[repr(transparent)] |
52 | pub struct GpioOpenStatus(pub i32); | |
53 | impl 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 | } | |
60 | impl ::core::marker::Copy for GpioOpenStatus {} | |
61 | impl ::core::clone::Clone for GpioOpenStatus { | |
62 | fn clone(&self) -> Self { | |
63 | *self | |
64 | } | |
65 | } | |
66 | pub type GpioPin = *mut ::core::ffi::c_void; | |
04454e1e | 67 | #[doc = "*Required features: `\"Devices_Gpio\"`*"] |
5e7ed085 FG |
68 | #[repr(transparent)] |
69 | pub struct GpioPinDriveMode(pub i32); | |
70 | impl 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 | } | |
80 | impl ::core::marker::Copy for GpioPinDriveMode {} | |
81 | impl ::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)] |
88 | pub struct GpioPinEdge(pub i32); | |
89 | impl GpioPinEdge { | |
90 | pub const FallingEdge: Self = Self(0i32); | |
91 | pub const RisingEdge: Self = Self(1i32); | |
92 | } | |
93 | impl ::core::marker::Copy for GpioPinEdge {} | |
94 | impl ::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)] |
101 | pub struct GpioPinValue(pub i32); | |
102 | impl GpioPinValue { | |
103 | pub const Low: Self = Self(0i32); | |
104 | pub const High: Self = Self(1i32); | |
105 | } | |
106 | impl ::core::marker::Copy for GpioPinValue {} | |
107 | impl ::core::clone::Clone for GpioPinValue { | |
108 | fn clone(&self) -> Self { | |
109 | *self | |
110 | } | |
111 | } | |
112 | pub type GpioPinValueChangedEventArgs = *mut ::core::ffi::c_void; | |
04454e1e | 113 | #[doc = "*Required features: `\"Devices_Gpio\"`*"] |
5e7ed085 FG |
114 | #[repr(transparent)] |
115 | pub struct GpioSharingMode(pub i32); | |
116 | impl GpioSharingMode { | |
117 | pub const Exclusive: Self = Self(0i32); | |
118 | pub const SharedReadOnly: Self = Self(1i32); | |
119 | } | |
120 | impl ::core::marker::Copy for GpioSharingMode {} | |
121 | impl ::core::clone::Clone for GpioSharingMode { | |
122 | fn clone(&self) -> Self { | |
123 | *self | |
124 | } | |
125 | } |