@@ -27,7 +27,7 @@ use crate::capsule_content::{
2727 find_bios_version, find_ec_in_bios_cap, find_pd_in_bios_cap, find_retimer_version,
2828} ;
2929use crate :: ccgx:: device:: { PdController , PdPort } ;
30- #[ cfg( not ( feature = "uefi" ) ) ]
30+ #[ cfg( feature = "hidapi" ) ]
3131use crate :: ccgx:: hid:: { check_ccg_fw_version, find_devices, DP_CARD_PID , HDMI_CARD_PID } ;
3232use crate :: ccgx:: { self , SiliconId :: * } ;
3333use crate :: chromium_ec;
@@ -48,7 +48,7 @@ use crate::smbios::{dmidecode_string_val, get_smbios, is_framework};
4848use crate :: uefi:: enable_page_break;
4949use crate :: util;
5050use crate :: util:: Config ;
51- #[ cfg( not ( feature = "uefi" ) ) ]
51+ #[ cfg( feature = "hidapi" ) ]
5252use hidapi:: HidApi ;
5353use sha2:: { Digest , Sha256 , Sha384 , Sha512 } ;
5454//use smbioslib::*;
@@ -197,15 +197,15 @@ fn print_pd_details(ec: &CrosEc) {
197197 print_single_pd_details ( & pd_23) ;
198198}
199199
200- #[ cfg( not ( feature = "uefi" ) ) ]
200+ #[ cfg( feature = "hidapi" ) ]
201201const NOT_SET : & str = "NOT SET" ;
202202
203203#[ cfg( not( feature = "uefi" ) ) ]
204204fn print_audio_card_details ( ) {
205205 check_synaptics_fw_version ( ) ;
206206}
207207
208- #[ cfg( not ( feature = "uefi" ) ) ]
208+ #[ cfg( feature = "hidapi" ) ]
209209fn print_dp_hdmi_details ( ) {
210210 match HidApi :: new ( ) {
211211 Ok ( api) => {
@@ -270,7 +270,7 @@ fn print_tool_version() {
270270}
271271
272272// TODO: Check if HDMI card is same
273- #[ cfg( not ( feature = "uefi" ) ) ]
273+ #[ cfg( feature = "hidapi" ) ]
274274fn flash_dp_hdmi_card ( pd_bin_path : & str ) {
275275 let data = match fs:: read ( pd_bin_path) {
276276 Ok ( data) => Some ( data) ,
@@ -616,12 +616,12 @@ pub fn run_with_args(args: &Cli, _allupdate: bool) -> i32 {
616616 } else if args. pd_info {
617617 print_pd_details ( & ec) ;
618618 } else if args. dp_hdmi_info {
619- #[ cfg( not ( feature = "uefi" ) ) ]
619+ #[ cfg( feature = "hidapi" ) ]
620620 print_dp_hdmi_details ( ) ;
621621 } else if let Some ( pd_bin_path) = & args. dp_hdmi_update {
622- #[ cfg( not ( feature = "uefi" ) ) ]
622+ #[ cfg( feature = "hidapi" ) ]
623623 flash_dp_hdmi_card ( pd_bin_path) ;
624- #[ cfg( feature = "uefi" ) ]
624+ #[ cfg( not ( feature = "hidapi" ) ) ]
625625 let _ = pd_bin_path;
626626 } else if args. audio_card_info {
627627 #[ cfg( not( feature = "uefi" ) ) ]
0 commit comments