| 165 | } |
| 166 | |
| 167 | int 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 | |
| 192 | int SynchroniBoard::call_open () |
| 193 | { |
nothing calls this directly
no test coverage detected