.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "TPMLIB_ChooseTPMVersion 3" .TH TPMLIB_ChooseTPMVersion 3 2024-03-09 libtpms "" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME TPMLIB_ChooseTPMVersion \- Choose the version of the TPM .SH SYNOPSIS .IX Header "SYNOPSIS" \&\fB#include .PP \&\fB#include .PP \&\fBTPM_RESULT TPMLIB_ChooseTPMVersion(TPMLIB_TPMVersion\fR \fIver\fR\fB);\fR .PP .Vb 4 \& typedef enum TPMLIB_TPMVersion { \& TPMLIB_TPM_VERSION_1_2, \& TPMLIB_TPM_VERSION_2, \& } TPMLIB_TPMVersion; .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" The \fBTPMLIB_ChooseTPMVersion()\fR function is used to choose the version of the TPM, either a TPM 1.2 or TPM 2. .PP This function must be called before \fBTPMLIB_MainInit()\fR is called and will otherwise return an error. This function may be called again once \&\fBTPMLIB_Terminate()\fR has been called. .PP If this function is not called, the last chosen TPM version will be started with \fBTPMLIB_MainInit()\fR. If this function is not called, a TPM 1.2 will be used. .SH ERRORS .IX Header "ERRORS" .IP \fBTPM_SUCCESS\fR 4 .IX Item "TPM_SUCCESS" The version of the TPM was chosen successfully. .IP \fBTPM_FAIL\fR 4 .IX Item "TPM_FAIL" The choice of the TPM was wrong, or \fBTPMLIB_MainInit()\fR has already been called. .PP For a complete list of TPM error codes please consult the include file \&\fBlibtpms/tpm_error.h\fR .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBTPMLIB_MainInit\fR(3), \fBTPMLIB_Terminate\fR(3)