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

Method bluetooth_open_device

src/board_controller/bt_lib_board.cpp:136–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136int 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
156int BTLibBoard::bluetooth_close_device ()
157{

Callers

nothing calls this directly

Calls 1

get_addressMethod · 0.45

Tested by

no test coverage detected