| 154 | } |
| 155 | |
| 156 | int BTLibBoard::bluetooth_close_device () |
| 157 | { |
| 158 | int (*func_close) (char *) = |
| 159 | (int (*) (char *))dll_loader->get_address ("bluetooth_close_device"); |
| 160 | if (func_close == NULL) |
| 161 | { |
| 162 | safe_logger ( |
| 163 | spdlog::level::err, "failed to get function address for bluetooth_close_device"); |
| 164 | return (int)BrainFlowExitCodes::GENERAL_ERROR; |
| 165 | } |
| 166 | int res = func_close (const_cast<char *> (params.mac_address.c_str ())); |
| 167 | if (res != (int)SocketBluetoothReturnCodes::STATUS_OK) |
| 168 | { |
| 169 | safe_logger (spdlog::level::err, "failed to close bt connection: {}", res); |
| 170 | return (int)BrainFlowExitCodes::BOARD_WRITE_ERROR; |
| 171 | } |
| 172 | return (int)BrainFlowExitCodes::STATUS_OK; |
| 173 | } |
| 174 | |
| 175 | int BTLibBoard::bluetooth_write_data (const char *command, int len) |
| 176 | { |
nothing calls this directly
no test coverage detected