libtiepie-hw
1.2.5
|
Functions to initialize and exit the library and retrieve information from the library itself. More...
Data Structures | |
struct | tiepie_hw_version |
Structure with library version info. More... | |
Functions | |
TIEPIE_HW_API void | tiepie_hw_init (void) |
Create and initialize internal resources used by the library. More... | |
TIEPIE_HW_API tiepie_hw_bool | tiepie_hw_is_initialized (void) |
Check whether the library's internal resources are initialized. More... | |
TIEPIE_HW_API void | tiepie_hw_fini (void) |
Clear and free internal resources used by the library. More... | |
TIEPIE_HW_API const tiepie_hw_version * | tiepie_hw_get_version (void) |
Get library version info. More... | |
TIEPIE_HW_API uint32_t | tiepie_hw_get_config (uint8_t *buffer, uint32_t length) |
Get the library configuration number. More... | |
TIEPIE_HW_API tiepie_hw_status | tiepie_hw_get_last_status (void) |
Get the last status value. More... | |
TIEPIE_HW_API const char * | tiepie_hw_get_last_status_str (void) |
Get the last status value as text. More... | |
Functions to initialize and exit the library and retrieve information from the library itself.
After loading the library, it must be initialized first, before functions in the library can be used. Before closing the library, when the application using the library no longer requires it, tiepie_hw_fini() must be called, to clear and free resources used by the library.
The library has a version number and a configuration number that can be queried. These can be used when requesting support from TiePie engineering.
On each library function call a status flag is set, indicating how the function was executed. When a function call behaves different than expected, check the status for possible causes.
TIEPIE_HW_API void tiepie_hw_init | ( | void | ) |
Create and initialize internal resources used by the library.
This function must be called after loading the library, before non library related functions in the library can be used. Calling non library related functions before the library is initialized will set the status flag to TIEPIE_HW_STATUS_LIBRARY_NOT_INITIALIZED.
TIEPIE_HW_API tiepie_hw_bool tiepie_hw_is_initialized | ( | void | ) |
Check whether the library's internal resources are initialized.
TIEPIE_HW_API void tiepie_hw_fini | ( | void | ) |
Clear and free internal resources used by the library.
This function must be called before closing the library, when the application using the library no longer requires it.
TIEPIE_HW_API const tiepie_hw_version* tiepie_hw_get_version | ( | void | ) |
Get library version info.
TIEPIE_HW_API uint32_t tiepie_hw_get_config | ( | uint8_t * | buffer, |
uint32_t | length | ||
) |
Get the library configuration number.
[out] | buffer | A pointer to the buffer to write to. |
[in] | length | The length of the buffer, in bytes. |
TIEPIE_HW_API tiepie_hw_status tiepie_hw_get_last_status | ( | void | ) |
Get the last status value.
After each call to a library function, a status flag is set, indicating how the function was executed.
TIEPIE_HW_API const char* tiepie_hw_get_last_status_str | ( | void | ) |
Get the last status value as text.
After each call to a library function, a status flag is set, indicating how the function was executed.