We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aeea001 commit b957752Copy full SHA for b957752
zephyr/src/device/gpio.rs
@@ -42,6 +42,9 @@ pub struct Gpio {
42
pub(crate) device: *const raw::device,
43
}
44
45
+// SAFETY: Gpio's can be shared with other threads. Safety is maintained by the Token.
46
+unsafe impl Send for Gpio {}
47
+
48
impl Gpio {
49
/// Constructor, used by the devicetree generated code.
50
///
@@ -73,6 +76,9 @@ pub struct GpioPin {
73
76
pub(crate) pin: raw::gpio_dt_spec,
74
77
75
78
79
+// SAFETY: GpioPin's can be shared with other threads. Safety is maintained by the Token.
80
+unsafe impl Send for GpioPin {}
81
82
impl GpioPin {
83
84
#[allow(dead_code)]
0 commit comments