| 614 | } |
| 615 | |
| 616 | simpleble_err_t BLELibBoard::simpleble_peripheral_notify (simpleble_peripheral_t handle, |
| 617 | simpleble_uuid_t service, simpleble_uuid_t characteristic, |
| 618 | void (*callback) (simpleble_peripheral_t handle, simpleble_uuid_t service, |
| 619 | simpleble_uuid_t characteristic, const uint8_t *data, size_t data_length, void *userdata), |
| 620 | void *userdata) |
| 621 | { |
| 622 | #ifndef STATIC_SIMPLEBLE |
| 623 | std::lock_guard<std::mutex> lock (BLELibBoard::mutex); |
| 624 | if (BLELibBoard::dll_loader == NULL) |
| 625 | { |
| 626 | safe_logger (spdlog::level::err, "BLELibBoard::dll_loader is not initialized"); |
| 627 | return SIMPLEBLE_FAILURE; |
| 628 | } |
| 629 | simpleble_err_t (*func) (simpleble_peripheral_t, simpleble_uuid_t, simpleble_uuid_t, |
| 630 | void (*) (simpleble_peripheral_t, simpleble_uuid_t, simpleble_uuid_t, const uint8_t *, |
| 631 | size_t, void *), |
| 632 | void *) = (simpleble_err_t (*) (simpleble_peripheral_t, simpleble_uuid_t, simpleble_uuid_t, |
| 633 | void (*) (simpleble_peripheral_t, simpleble_uuid_t, simpleble_uuid_t, const uint8_t *, |
| 634 | size_t, void *), |
| 635 | void *))BLELibBoard::dll_loader->get_address ("simpleble_peripheral_notify"); |
| 636 | if (func == NULL) |
| 637 | { |
| 638 | safe_logger ( |
| 639 | spdlog::level::err, "failed to get function address for simpleble_peripheral_notify"); |
| 640 | return SIMPLEBLE_FAILURE; |
| 641 | } |
| 642 | |
| 643 | return func (handle, service, characteristic, callback, userdata); |
| 644 | #else |
| 645 | return ::simpleble_peripheral_notify (handle, service, characteristic, callback, userdata); |
| 646 | #endif |
| 647 | } |
| 648 | |
| 649 | simpleble_err_t BLELibBoard::simpleble_peripheral_unsubscribe ( |
| 650 | simpleble_peripheral_t handle, simpleble_uuid_t service, simpleble_uuid_t characteristic) |
nothing calls this directly
no test coverage detected