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

Method call_init

src/board_controller/synchroni/synchroni_board.cpp:167–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

165}
166
167int SynchroniBoard::call_init ()
168{
169
170 if (dll_loader == NULL)
171 {
172 return (int)BrainFlowExitCodes::BOARD_NOT_READY_ERROR;
173 }
174 int (*func) (void *) = (int (*) (void *))dll_loader->get_address ("synchroni_initialize");
175 if (func == NULL)
176 {
177 safe_logger (spdlog::level::err, "failed to get function address for initialize");
178 return (int)BrainFlowExitCodes::GENERAL_ERROR;
179 }
180
181 std::tuple<int, struct BrainFlowInputParams, json> info =
182 std::make_tuple (board_id, params, board_descr);
183
184 int res = func ((void *)&info);
185 if (res != (int)BrainFlowExitCodes::STATUS_OK)
186 {
187 safe_logger (spdlog::level::err, "failed to initialize {}", res);
188 }
189 return res;
190}
191
192int SynchroniBoard::call_open ()
193{

Callers

nothing calls this directly

Calls 1

get_addressMethod · 0.45

Tested by

no test coverage detected