Skip to content

Commit

Permalink
Merge pull request #60 from dobairoland/feat/c6h2_get_security_info
Browse files Browse the repository at this point in the history
Add ESP32-C6 and ESP32-H2 support for get_security_info
  • Loading branch information
JurajSadel committed May 10, 2024
2 parents 09944f9 + 6f60852 commit f835fb8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
1 change: 1 addition & 0 deletions ld/esp32c6_rom.x
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ PROVIDE( esp_rom_spiflash_write_encrypted = 0x40000114 );
PROVIDE( esp_rom_spiflash_write_enable = 0x4000015c );
PROVIDE( esp_rom_spiflash_erase_area = 0x40000158 );
PROVIDE( esp_flasher_rom_get_uart = 0x400000b4 );
PROVIDE( get_security_info_proc = 0x400000bc );
3 changes: 2 additions & 1 deletion ld/esp32h2_rom.x
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ PROVIDE( esp_rom_spiflash_attach = 0x400001d4 );
PROVIDE( esp_rom_spiflash_write_encrypted = 0x4000010c );
PROVIDE( esp_rom_spiflash_write_enable = 0x40000154 );
PROVIDE( esp_rom_spiflash_erase_area = 0x40000150 );
PROVIDE( esp_flasher_rom_get_uart = 0x400000b4 );
PROVIDE( esp_flasher_rom_get_uart = 0x400000b4 );
PROVIDE( get_security_info_proc = 0x400000bc );
6 changes: 0 additions & 6 deletions src/targets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,12 +243,6 @@ pub trait EspCommon {
}
}

#[cfg(any(feature = "esp32c6", feature = "esp32h2"))]
fn get_security_info(&self) -> Result<[u8; SECURITY_INFO_BYTES], Error> {
Err(Error::InvalidCommand)
}

#[cfg(not(any(feature = "esp32c6", feature = "esp32h2")))]
fn get_security_info(&self) -> Result<[u8; SECURITY_INFO_BYTES], Error> {
let mut buf: [u8; SECURITY_INFO_BYTES] = [0; SECURITY_INFO_BYTES];

Expand Down

0 comments on commit f835fb8

Please sign in to comment.