MCPcopy Create free account
hub / github.com/brainflow-dev/brainflow / call_init

Method call_init

src/board_controller/openbci/ganglion.cpp:671–692  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

669}
670
671int 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
694int Ganglion::call_open ()
695{

Callers

nothing calls this directly

Calls 1

get_addressMethod · 0.45

Tested by

no test coverage detected