1 | =head1 NAME
|
---|
2 |
|
---|
3 | TPMLIB_ChooseTPMVersion - Choose the version of the TPM
|
---|
4 |
|
---|
5 | =head1 SYNOPSIS
|
---|
6 |
|
---|
7 | B<#include <libtpms/tpm_types.h>>
|
---|
8 |
|
---|
9 | B<#include <libtpms/tpm_library.h>>
|
---|
10 |
|
---|
11 | B<TPM_RESULT TPMLIB_ChooseTPMVersion(TPMLIB_TPMVersion> I<ver>B<);>
|
---|
12 |
|
---|
13 | typedef enum TPMLIB_TPMVersion {
|
---|
14 | TPMLIB_TPM_VERSION_1_2,
|
---|
15 | TPMLIB_TPM_VERSION_2,
|
---|
16 | } TPMLIB_TPMVersion;
|
---|
17 |
|
---|
18 | =head1 DESCRIPTION
|
---|
19 |
|
---|
20 | The B<TPMLIB_ChooseTPMVersion()> function is used to choose the version
|
---|
21 | of the TPM, either a TPM 1.2 or TPM 2.
|
---|
22 |
|
---|
23 | This function must be called before B<TPMLIB_MainInit()> is called and
|
---|
24 | will otherwise return an error. This function may be called again once
|
---|
25 | B<TPMLIB_Terminate()> has been called.
|
---|
26 |
|
---|
27 | If this function is not called, the last chosen TPM version will be
|
---|
28 | started with B<TPMLIB_MainInit()>. If this function is not called,
|
---|
29 | a TPM 1.2 will be used.
|
---|
30 |
|
---|
31 | =head1 ERRORS
|
---|
32 |
|
---|
33 | =over 4
|
---|
34 |
|
---|
35 | =item B<TPM_SUCCESS>
|
---|
36 |
|
---|
37 | The version of the TPM was chosen successfully.
|
---|
38 |
|
---|
39 | =item B<TPM_FAIL>
|
---|
40 |
|
---|
41 | The choice of the TPM was wrong, or TPMLIB_MainInit() has already been called.
|
---|
42 |
|
---|
43 | =back
|
---|
44 |
|
---|
45 | For a complete list of TPM error codes please consult the include file
|
---|
46 | B<libtpms/tpm_error.h>
|
---|
47 |
|
---|
48 | =head1 SEE ALSO
|
---|
49 |
|
---|
50 | B<TPMLIB_MainInit>(3), B<TPMLIB_Terminate>(3)
|
---|
51 |
|
---|
52 | =cut
|
---|