| 7 | BLE_API::BLE_API() = default; |
| 8 | |
| 9 | class BLEAPICallback : public NimBLEServerCallbacks { |
| 10 | BLE_API *api; |
| 11 | |
| 12 | void onConnect(NimBLEServer *pServer, NimBLEConnInfo &connInfo) override { |
| 13 | pServer->updateConnParams(connInfo.getConnHandle(), 6, 24, 0, 400); // Improve latency |
| 14 | }; |
| 15 | |
| 16 | void onMTUChange(uint16_t MTU, NimBLEConnInfo &connInfo) override { api->update_mtu(MTU); }; |
| 17 | |
| 18 | public: |
| 19 | explicit BLEAPICallback(BLE_API *api) : api(api) {} |
| 20 | }; |
| 21 | |
| 22 | void BLE_API::setup() { |
| 23 | NimBLEDevice::init("Bruce"); |
nothing calls this directly
no outgoing calls
no test coverage detected