Returns the error code for the most recent error that occurred in the library.
#include txcpi.h
CPI_ERR_TYPE cpi_get_last_error()
When a CPI library function returns CPI_ERROR, use cpi_get_last_error to determine the error code. Then use cpi_get_error_str to convert this errnum into an ASCII string describing the error.