| 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 | { |
nothing calls this directly
no outgoing calls
no test coverage detected