| 669 | } |
| 670 | |
| 671 | int Ganglion::call_init () |
| 672 | { |
| 673 | if (dll_loader == NULL) |
| 674 | { |
| 675 | return (int)BrainFlowExitCodes::BOARD_NOT_READY_ERROR; |
| 676 | } |
| 677 | int (*func) (void *) = (int (*) (void *))dll_loader->get_address ("initialize"); |
| 678 | if (func == NULL) |
| 679 | { |
| 680 | safe_logger (spdlog::level::err, "failed to get function address for initialize"); |
| 681 | return (int)BrainFlowExitCodes::GENERAL_ERROR; |
| 682 | } |
| 683 | |
| 684 | struct GanglionLib::GanglionInputData input_data (params.timeout, params.serial_port.c_str ()); |
| 685 | int res = func ((void *)&input_data); |
| 686 | if (res != (int)GanglionLib::CustomExitCodes::STATUS_OK) |
| 687 | { |
| 688 | safe_logger (spdlog::level::err, "failed to init GanglionLib {}", res); |
| 689 | return (int)BrainFlowExitCodes::GENERAL_ERROR; |
| 690 | } |
| 691 | return (int)BrainFlowExitCodes::STATUS_OK; |
| 692 | } |
| 693 | |
| 694 | int Ganglion::call_open () |
| 695 | { |
nothing calls this directly
no test coverage detected