Skip to content

Commit cdf538d

Browse files
committed
ccgx: Derive more traits on the structs
Signed-off-by: Daniel Schaefer <dhs@frame.work>
1 parent 7c9c7dc commit cdf538d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

framework_lib/src/ccgx/device.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const HPI_RESET_DEV_CMD: u8 = 1;
2323
const _HPI_FLASH_READ_CMD: u8 = 0;
2424
const _HPI_FLASH_WRITE_CMD: u8 = 1;
2525

26+
#[derive(Debug, Copy, Clone)]
2627
enum ControlRegisters {
2728
DeviceMode = 0,
2829
SiliconId = 2, // Two bytes long, First LSB, then MSB
@@ -40,7 +41,7 @@ enum ControlRegisters {
4041
_FlashRwMem = 0x0200,
4142
}
4243

43-
#[derive(Debug)]
44+
#[derive(Debug, PartialEq, Clone, Copy)]
4445
pub enum PdPort {
4546
Left01,
4647
Right23,
@@ -148,7 +149,7 @@ pub struct PdController {
148149
ec: CrosEc,
149150
}
150151

151-
#[derive(Debug, PartialEq)]
152+
#[derive(Debug, PartialEq, Clone, Copy)]
152153
pub enum FwMode {
153154
BootLoader = 0,
154155
/// Backup CCGX firmware (No 1)

0 commit comments

Comments
 (0)