| 134 | } |
| 135 | |
| 136 | int BTLibBoard::bluetooth_open_device () |
| 137 | { |
| 138 | int (*func_open) (int, char *) = |
| 139 | (int (*) (int, char *))dll_loader->get_address ("bluetooth_open_device"); |
| 140 | if (func_open == NULL) |
| 141 | { |
| 142 | safe_logger ( |
| 143 | spdlog::level::err, "failed to get function address for bluetooth_open_device"); |
| 144 | return (int)BrainFlowExitCodes::GENERAL_ERROR; |
| 145 | } |
| 146 | |
| 147 | int res = func_open (params.ip_port, const_cast<char *> (params.mac_address.c_str ())); |
| 148 | if (res != (int)SocketBluetoothReturnCodes::STATUS_OK) |
| 149 | { |
| 150 | safe_logger (spdlog::level::err, "failed to open bt connection: {}", res); |
| 151 | return (int)BrainFlowExitCodes::BOARD_NOT_READY_ERROR; |
| 152 | } |
| 153 | return (int)BrainFlowExitCodes::STATUS_OK; |
| 154 | } |
| 155 | |
| 156 | int BTLibBoard::bluetooth_close_device () |
| 157 | { |
nothing calls this directly
no test coverage detected