diff options
Diffstat (limited to 'src/import')
-rwxr-xr-x | src/import/hwpf/fapi2/tools/parseAttributeInfo.pl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/import/hwpf/fapi2/tools/parseAttributeInfo.pl b/src/import/hwpf/fapi2/tools/parseAttributeInfo.pl index 5037d7ddf..061bd11d4 100755 --- a/src/import/hwpf/fapi2/tools/parseAttributeInfo.pl +++ b/src/import/hwpf/fapi2/tools/parseAttributeInfo.pl @@ -622,12 +622,16 @@ foreach my $argnum ( 0 .. $#ARGV ) # hasFeature with the attribute specific logic if ( exists $attr->{chipEcFeature} ) { - my $chipCount = 0; + my $chipCount = 0; + my $falseIfMatch = exists $attr->{chipEcFeature}->{falseIfMatch}; + my $noMatchValue = $falseIfMatch ? 1 : 0; + my $yesMatchValue = $falseIfMatch ? 0 : 1; + print ECHFILE " inline uint8_t hasFeature(int2Type<$attr->{id}>,\n"; print ECHFILE " fapi2::ATTR_NAME_Type i_name,\n"; print ECHFILE " fapi2::ATTR_EC_Type i_ec)\n"; print ECHFILE " {\n"; - print ECHFILE " uint8_t hasFeature = 0;\n\n"; + print ECHFILE " uint8_t hasFeature = $noMatchValue;\n\n"; print ECHFILE " if("; foreach my $chip ( @{ $attr->{chipEcFeature}->{chip} } ) @@ -694,7 +698,7 @@ foreach my $argnum ( 0 .. $#ARGV ) } print ECHFILE ")\n"; print ECHFILE " {\n"; - print ECHFILE " hasFeature = 1;\n"; + print ECHFILE " hasFeature = $yesMatchValue;\n"; print ECHFILE " }\n"; print ECHFILE " return hasFeature;\n"; print ECHFILE " };\n"; |