The functions in this section provides ability to check device version and perform updates
◆ LMS_LogHandler
typedef void(* LMS_LogHandler) (int lvl, const char *msg) |
Callback function for redirecting API messages
- Parameters
-
Definition at line 1348 of file LimeSuite.h.
◆ lms_prog_callback_t
typedef bool(* lms_prog_callback_t) (int bsent, int btotal, const char *progressMsg) |
Callback from programming processes
- Parameters
-
bsent | number of bytes transferred |
btotal | total number of bytes to send |
progressMsg | string describing current progress state |
- Returns
- 0-continue programming, 1-abort operation
Definition at line 1269 of file LimeSuite.h.
◆ LMS_GetDeviceInfo()
Get device serial number and version information
- Note
- This function returns pointer to internal data structure that gets deallocated when device is closed. Do not attempt to read from it after closing the device. If you need to keep using device info returned by this function after closing the device, make a copy before closing the device.
- Parameters
-
device | Device handle previously obtained by LMS_Open(). |
- Returns
- pointer to device info structure lms_dev_info_t
◆ LMS_GetLastErrorMessage()
API_EXPORT const char *CALL_CONV LMS_GetLastErrorMessage |
( |
void |
| ) |
|
◆ LMS_GetProgramModes()
Get the list of supported programming modes.
- Parameters
-
| device | Device handle previously obtained by LMS_Open(). |
[out] | list | list of programming modes (can be NULL). |
- Returns
- number of modes in the list, (-1) on failure
◆ LMS_Program()
Write binary firmware/bitsteam image to specified device component.
- Parameters
-
device | Device handle previously obtained by LMS_Open(). |
data | Pointer to memory containing firmware/bitsteam image |
size | Size of firmware/bitsteam image in bytes. |
mode | programming mode, use LMS_GetProgramModes to get list of modes |
callback | callback function for monitoring progress |
- Returns
- 0 on success, (-1) on failure
◆ LMS_RegisterLogHandler()
Register a new system log handler. Should be called to replace the default stdio handler.
- Parameters
-
handler | function for handling API messages |