File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,12 @@ Versioning](https://semver.org/spec/v2.0.0.html).
1010
1111## v0.5.0
1212
13- - Fix lsgpio example to output gpio line flags
14- - Add ` is_empty() ` function for ` Lines ` struct
13+ - Fix lsgpio example to output gpio line flags.
14+ - Add ` is_empty() ` function for ` Lines ` struct.
15+ - Add common trait implementations for public structures.
1516- Update Tokio to 1.x. #[ 55] ((https://github.com/rust-embedded/gpio-cdev/pull/55 ).
1617- Breaking change of ` LineEventHandle::get_event() ` which now expects ` &mut self ` .
17- - MSRV is now 1.46.0
18+ - MSRV is now 1.46.0.
1819- Updated ` nix ` to version ` 0.22 ` .
1920- Updated ` quicli ` to version ` 0.4 ` .
2021- Updated ` bitflags ` to version ` 1.3 ` .
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ mod async_tokio;
107107pub mod errors; // pub portion is deprecated
108108mod ffi;
109109
110- #[ derive( Debug ) ]
110+ #[ derive( Debug , Clone , Copy , PartialEq ) ]
111111pub enum IoctlKind {
112112 ChipInfo ,
113113 LineInfo ,
@@ -168,6 +168,8 @@ pub struct Chip {
168168 inner : Arc < InnerChip > ,
169169}
170170
171+ /// Iterator over chips
172+ #[ derive( Debug ) ]
171173pub struct ChipIterator {
172174 readdir : ReadDir ,
173175}
@@ -297,6 +299,7 @@ impl Chip {
297299}
298300
299301/// Iterator over GPIO Lines for a given chip.
302+ #[ derive( Debug ) ]
300303pub struct LineIterator {
301304 chip : Arc < InnerChip > ,
302305 idx : u32 ,
@@ -388,7 +391,7 @@ bitflags! {
388391}
389392
390393/// In or Out
391- #[ derive( Debug , PartialEq ) ]
394+ #[ derive( Debug , Clone , Copy , PartialEq ) ]
392395pub enum LineDirection {
393396 In ,
394397 Out ,
@@ -893,7 +896,7 @@ impl AsRawFd for MultiLineHandle {
893896/// Maps to kernel [`GPIOEVENT_EVENT_*`] definitions.
894897///
895898/// [`GPIOEVENT_EVENT_*`]: https://elixir.bootlin.com/linux/v4.9.127/source/include/uapi/linux/gpio.h#L136
896- #[ derive( Debug , PartialEq ) ]
899+ #[ derive( Debug , Clone , Copy , PartialEq ) ]
897900pub enum EventType {
898901 RisingEdge ,
899902 FallingEdge ,
You can’t perform that action at this time.
0 commit comments