Skip to content

Commit 7c9c7dc

Browse files
committed
ccgx: Add more command definitions
Signed-off-by: Daniel Schaefer <dhs@frame.work>
1 parent f6b1353 commit 7c9c7dc

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

framework_lib/src/ccgx/device.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,30 @@ use crate::util::{assert_win_len, Config, Platform};
1414

1515
use super::*;
1616

17+
const _HPI_FLASH_ENTER_SIGNATURE: char = 'P';
18+
const _HPI_JUMP_TO_ALT_SIGNATURE: char = 'A';
19+
const _HPI_JUMP_TO_BOOT_SIGNATURE: char = 'J';
20+
const HPI_RESET_SIGNATURE: char = 'R';
21+
const _HPI_FLASH_RW_SIGNATURE: char = 'F';
22+
const HPI_RESET_DEV_CMD: u8 = 1;
23+
const _HPI_FLASH_READ_CMD: u8 = 0;
24+
const _HPI_FLASH_WRITE_CMD: u8 = 1;
25+
1726
enum ControlRegisters {
1827
DeviceMode = 0,
1928
SiliconId = 2, // Two bytes long, First LSB, then MSB
29+
_InterruptStatus = 0x06,
30+
_JumpToBoot = 0x07,
31+
ResetRequest = 0x08,
32+
_FlashmodeEnter = 0x0A,
33+
_ValidateFw = 0x0B,
34+
_FlashSignature = 0x0C,
2035
BootLoaderVersion = 0x10,
2136
Firmware1Version = 0x18,
2237
Firmware2Version = 0x20,
38+
PdPortsEnable = 0x2C,
39+
_ResponseType = 0x7E,
40+
_FlashRwMem = 0x0200,
2341
}
2442

2543
#[derive(Debug)]

0 commit comments

Comments
 (0)