| 346 | } |
| 347 | |
| 348 | int UnicornBoard::call_close () |
| 349 | { |
| 350 | int (*func_close) (UNICORN_HANDLE *) = |
| 351 | (int (*) (UNICORN_HANDLE *))dll_loader->get_address ("UNICORN_CloseDevice"); |
| 352 | if (func_close == NULL) |
| 353 | { |
| 354 | safe_logger (spdlog::level::err, "failed to get function address for UNICORN_CloseDevice"); |
| 355 | return (int)BrainFlowExitCodes::GENERAL_ERROR; |
| 356 | } |
| 357 | int ec = func_close (&device_handle); |
| 358 | if (ec != UNICORN_ERROR_SUCCESS) |
| 359 | { |
| 360 | safe_logger (spdlog::level::err, "Error in UNICORN_CloseDevice {}", ec); |
| 361 | return (int)BrainFlowExitCodes::GENERAL_ERROR; |
| 362 | } |
| 363 | return (int)BrainFlowExitCodes::STATUS_OK; |
| 364 | } |
| 365 | |
| 366 | |
| 367 | // stub for macos |
nothing calls this directly
no test coverage detected