Handles¶
-
int
libmk_create_handle
(LibMK_Handle **handle, LibMK_Device *device)¶ Internal function. Allocate and fill LibMK_Handle struct.
-
int
libmk_free_handle
(LibMK_Handle *handle)¶ Internal function. Free memory of allocated LibMK_Handle.
-
int
libmk_set_device
(LibMK_Model model, LibMK_Handle **handle)¶ Initialize a device within the library.
If NULL is passed for handle the function will set the global
LibMK_Handle to the device specified. The function chooses the first available device of the specified model to assign to the handle.- Return
LibMK_Result code, NULL or valid pointer in *handle.
- Parameters
model
: Model to initialize. The model must be connected, else LIBMK_ERR_DEV_NOT_CONNECTED is returned.handle
: Pointer to pointer of struct LibMK_Handle. The funtion allocates a LibMK_Handle struct and stores a pointer to it here.