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

Method bluetooth_close_device

src/board_controller/bt_lib_board.cpp:156–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

154}
155
156int 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
175int BTLibBoard::bluetooth_write_data (const char *command, int len)
176{

Callers

nothing calls this directly

Calls 1

get_addressMethod · 0.45

Tested by

no test coverage detected