File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
7
7
8
8
## [ Unreleased]
9
9
10
+ ### Added
11
+
12
+ - Added Sync & Send ability to Pin
13
+
10
14
## [ v0.10.0] - 2018-12-23
11
15
12
16
### Added
Original file line number Diff line number Diff line change @@ -65,6 +65,12 @@ pub struct Pin<MODE> {
65
65
_mode : PhantomData < MODE > ,
66
66
}
67
67
68
+ // NOTE(unsafe) The only write acess is to BSRR, which is thread safe
69
+ unsafe impl < MODE > Sync for Pin < MODE > { }
70
+ // NOTE(unsafe) this only enables read access to the same pin from multiple
71
+ // threads
72
+ unsafe impl < MODE > Send for Pin < MODE > { }
73
+
68
74
impl < MODE > StatefulOutputPin for Pin < Output < MODE > > {
69
75
fn is_set_high ( & self ) -> bool {
70
76
!self . is_set_low ( )
You can’t perform that action at this time.
0 commit comments