| 195 | } |
| 196 | |
| 197 | simpleble_err_t BLELibBoard::simpleble_adapter_scan_for (simpleble_adapter_t handle, int timeout_ms) |
| 198 | { |
| 199 | #ifndef STATIC_SIMPLEBLE |
| 200 | std::lock_guard<std::mutex> lock (BLELibBoard::mutex); |
| 201 | if (BLELibBoard::dll_loader == NULL) |
| 202 | { |
| 203 | safe_logger (spdlog::level::err, "BLELibBoard::dll_loader is not initialized"); |
| 204 | return SIMPLEBLE_FAILURE; |
| 205 | } |
| 206 | simpleble_err_t (*func) (simpleble_adapter_t, int) = (simpleble_err_t (*) (simpleble_adapter_t, |
| 207 | int))BLELibBoard::dll_loader->get_address ("simpleble_adapter_scan_for"); |
| 208 | if (func == NULL) |
| 209 | { |
| 210 | safe_logger ( |
| 211 | spdlog::level::err, "failed to get function address for simpleble_adapter_scan_for"); |
| 212 | return SIMPLEBLE_FAILURE; |
| 213 | } |
| 214 | |
| 215 | return func (handle, timeout_ms); |
| 216 | #else |
| 217 | return ::simpleble_adapter_scan_for (handle, timeout_ms); |
| 218 | #endif |
| 219 | } |
| 220 | |
| 221 | simpleble_err_t BLELibBoard::simpleble_adapter_scan_start (simpleble_adapter_t handle) |
| 222 | { |
nothing calls this directly
no test coverage detected