diff --git a/src/utility/HCI.cpp b/src/utility/HCI.cpp index 51366db3..e0019640 100644 --- a/src/utility/HCI.cpp +++ b/src/utility/HCI.cpp @@ -413,7 +413,7 @@ int HCIClass::leConnUpdate(uint16_t handle, uint16_t minInterval, uint16_t maxIn return sendCommand(OGF_LE_CTL << 10 | OCF_LE_CONN_UPDATE, sizeof(leConnUpdateData), &leConnUpdateData); } -int HCIClass::sendAclPkt(uint16_t handle, uint8_t cid, uint8_t plen, void* data) +int HCIClass::sendAclPkt(uint16_t handle, uint8_t cid, uint8_t plen, const void* data) { while (_pendingPkt >= _maxPkt) { poll(); @@ -462,7 +462,7 @@ void HCIClass::noDebug() _debug = NULL; } -int HCIClass::sendCommand(uint16_t opcode, uint8_t plen, void* parameters) +int HCIClass::sendCommand(uint16_t opcode, uint8_t plen, const void* parameters) { struct __attribute__ ((packed)) { uint8_t pktType; diff --git a/src/utility/HCI.h b/src/utility/HCI.h index 6d6b69ee..d33f6e9e 100644 --- a/src/utility/HCI.h +++ b/src/utility/HCI.h @@ -64,7 +64,7 @@ class HCIClass { virtual int leCancelConn(); - virtual int sendAclPkt(uint16_t handle, uint8_t cid, uint8_t plen, void* data); + virtual int sendAclPkt(uint16_t handle, uint8_t cid, uint8_t plen, const void* data); virtual int disconnect(uint16_t handle); @@ -72,7 +72,7 @@ class HCIClass { virtual void noDebug(); private: - virtual int sendCommand(uint16_t opcode, uint8_t plen = 0, void* parameters = NULL); + virtual int sendCommand(uint16_t opcode, uint8_t plen = 0, const void* parameters = nullptr); virtual void handleAclDataPkt(uint8_t plen, uint8_t pdata[]); virtual void handleNumCompPkts(uint16_t handle, uint16_t numPkts);