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

Function initialize

src/board_controller/neuromd/brainbit_bglib/main.cpp:60–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58 }
59
60 int initialize (void *param)
61 {
62 if (!initialized)
63 {
64 if (param == NULL)
65 {
66 return (int)BrainFlowExitCodes::UNABLE_TO_OPEN_PORT_ERROR;
67 }
68 std::tuple<int, struct BrainFlowInputParams, json> *info =
69 (std::tuple<int, struct BrainFlowInputParams, json> *)param;
70 BrainFlowInputParams params = std::get<1> (*info);
71 strcpy (uart_port, params.serial_port.c_str ());
72 timeout = params.timeout;
73 bglib_output = output;
74 exit_code = (int)BrainFlowExitCodes::SYNC_TIMEOUT_ERROR;
75 initialized = true;
76 }
77 return (int)BrainFlowExitCodes::STATUS_OK;
78 }
79
80 int open_device (void *param)
81 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected