| 140 | } |
| 141 | |
| 142 | int SynchroniBoard::config_board (std::string config, std::string &response) |
| 143 | { |
| 144 | if (dll_loader == NULL) |
| 145 | { |
| 146 | return (int)BrainFlowExitCodes::BOARD_NOT_READY_ERROR; |
| 147 | } |
| 148 | int (*func) (void *) = (int (*) (void *))dll_loader->get_address ("synchroni_config_device"); |
| 149 | if (func == NULL) |
| 150 | { |
| 151 | safe_logger (spdlog::level::err, "failed to get function address for release"); |
| 152 | return (int)BrainFlowExitCodes::GENERAL_ERROR; |
| 153 | } |
| 154 | |
| 155 | |
| 156 | const int BUFFER_SIZE = 1024; |
| 157 | char buffer[BUFFER_SIZE]; |
| 158 | memset (buffer, 0, sizeof (buffer)); |
| 159 | std::tuple<std::string, std::string, char *, int> info = |
| 160 | std::make_tuple (params.mac_address, config, buffer, BUFFER_SIZE); |
| 161 | |
| 162 | int res = func ((void *)&info); |
| 163 | response = buffer; |
| 164 | return res; |
| 165 | } |
| 166 | |
| 167 | int SynchroniBoard::call_init () |
| 168 | { |
nothing calls this directly
no test coverage detected