The important disclaimer is that this is demo quality code. It is not sample code or in any way a recommended way of interfacing to a TPM.
Use the TSS.
The library grew out some very early sample code, which we adapted for regression testing the SW TPM during development. We did not use the TSS because:
The library supports a number of command line utilities that can be used to test individual TPM functions. Eventually, the number got too large to test a TPM manually, so they were combined into an ever expanding bash script called 'test_console.sh'.
The command line utilities also stand on their own as a teaching tool. However, they are not in general compatible with the TSS tools.
Since the original command line tools grew in an ad hoc manner, each had different parameter formats. We have an ongoing effort to make the command line parameters consistent. The most useful commands are done, but others are subject to change.
There is no major effort to add new functions to the command line utilities, but we will consider requests.