Skip to content

Commit

Permalink
setup: generate more constants type hints
Browse files Browse the repository at this point in the history
Signed-off-by: Erik Larsson <who+github@cnackers.org>
  • Loading branch information
whooo committed Jan 28, 2024
1 parent 20556db commit 3ca802d
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,41 @@ class type_hints_generator(type_generator):
("TPM2_RH_", "TPM2_RH"),
("TPM2_SU_", "TPM2_SU"),
("TPMA_OBJECT_", "TPMA_OBJECT"),
("TPM2_CC_", "TPM2_CC"),
("TPM2_SPEC_", "TPM2_SPEC"),
("TPM2_GENERATED_", "TPM2_GENERATED"),
("TPM2_RC_", "TPM2_RC"),
("TSS2_RC_", "TSS2_RC"),
("TPM2_EO_", "TPM2_EO"),
("TPM2_ST_", "TPM2_ST"),
("TPM2_SE_", "TPM2_SE"),
("TPM2_CAP_", "TPM2_CAP"),
("TPM_AT_", "TPM_AT"),
("TPM2_PT_", "TPM2_PT"),
("TPM2_PT_VENDOR_", "TPM2_PT_VENDOR"),
("TPM2_PT_FIRMWARE_", "TPM2_PT_FIRMWARE"),
("TPM2_PT_HR_", "TPM2_PT_HR"),
("TPM2_PT_NV_", "TPM2_PT_NV"),
("TPM2_PT_CONTEXT_", "TPM2_PT_CONTEXT"),
("TPM2_PT_PS_", "TPM2_PT_PS"),
("TPM2_PT_AUDIT_", "TPM2_PT_AUDIT"),
("TPM2_PT_PCR_", "TPM2_PT_PCR"),
("TPM2_PS_", "TPM2_PS"),
("TPM2_HT_", "TPM2_HT"),
("TPMA_SESSION_", "TPMA_SESSION"),
("TPMA_LOCALITY_", "TPMA_LOCALITY"),
("TPM2_NT_", "TPM2_NT"),
("TPM2_HR_", "TPM2_HR"),
("TPM2_HC_", "TPM2_HC"),
("TPM2_CLOCK_", "TPM2_CLOCK"),
("TPMA_NV_", "TPMA_NV"),
("TPMA_CC_", "TPMA_CC"),
("TPMA_ALGORITHM_", "TPMA_ALGORITHM"),
("TPMA_PERMANENT_", "TPMA_PERMANENT"),
("TPMA_STARTUP_", "TPMA_STARTUP"),
("TPMA_MEMORY_", "TPMA_MEMORY"),
("TPM2_MAX_", "TPM2_MAX"),
("TPMA_MODES_", "TPMA_MODES"),
)

def macro_to_type(self, macro):
Expand Down

0 comments on commit 3ca802d

Please sign in to comment.