@@ -750,7 +750,7 @@ bool BLECharacteristic::notify32(int num)
750
750
751
751
752
752
/* ------------------------------------------------------------------*/
753
- /* INDICATE
753
+ /* INDICATE multiple connections
754
754
*------------------------------------------------------------------*/
755
755
bool BLECharacteristic::indicateEnabled (void )
756
756
{
@@ -763,7 +763,7 @@ bool BLECharacteristic::indicateEnabled(uint16_t conn_hdl)
763
763
return (getCccd (conn_hdl) & BLE_GATT_HVX_INDICATION);
764
764
}
765
765
766
- bool BLECharacteristic::indicate (const void * data, uint16_t len, uint16_t conn_hdl )
766
+ bool BLECharacteristic::indicate (uint16_t conn_hdl, const void * data, uint16_t len)
767
767
{
768
768
VERIFY ( _properties.indicate );
769
769
@@ -813,27 +813,60 @@ bool BLECharacteristic::indicate(const void* data, uint16_t len, uint16_t conn_h
813
813
return true ;
814
814
}
815
815
816
- bool BLECharacteristic::indicate (const char * str, uint16_t conn_hdl )
816
+ bool BLECharacteristic::indicate (uint16_t conn_hdl, const char * str)
817
817
{
818
- return indicate ((const uint8_t *) str, strlen (str), conn_hdl );
818
+ return indicate (conn_hdl, (const uint8_t *) str, strlen (str));
819
819
}
820
820
821
- bool BLECharacteristic::indicate8 (uint8_t num, uint16_t conn_hdl )
821
+ bool BLECharacteristic::indicate8 (uint16_t conn_hdl, uint8_t num )
822
822
{
823
- return indicate ((uint8_t *) &num, sizeof (num), conn_hdl );
823
+ return indicate (conn_hdl, (uint8_t *) &num, sizeof (num));
824
824
}
825
825
826
- bool BLECharacteristic::indicate16 (uint16_t num , uint16_t conn_hdl )
826
+ bool BLECharacteristic::indicate16 (uint16_t conn_hdl , uint16_t num )
827
827
{
828
- return indicate ((uint8_t *) &num, sizeof (num), conn_hdl );
828
+ return indicate (conn_hdl, (uint8_t *) &num, sizeof (num));
829
829
}
830
830
831
- bool BLECharacteristic::indicate32 (uint32_t num, uint16_t conn_hdl )
831
+ bool BLECharacteristic::indicate32 (uint16_t conn_hdl, uint32_t num )
832
832
{
833
- return indicate ((uint8_t *) &num, sizeof (num), conn_hdl );
833
+ return indicate (conn_hdl, (uint8_t *) &num, sizeof (num));
834
834
}
835
835
836
- bool BLECharacteristic::indicate32 (int num, uint16_t conn_hdl )
836
+ bool BLECharacteristic::indicate32 (uint16_t conn_hdl, int num )
837
837
{
838
- return indicate32 ((uint32_t ) num, conn_hdl);
838
+ return indicate32 (conn_hdl, (uint32_t ) num);
839
+ }
840
+
841
+ /* ------------------------------------------------------------------*/
842
+ /* INDICATE single connections
843
+ *------------------------------------------------------------------*/
844
+ bool BLECharacteristic::indicate (const void * data, uint16_t len)
845
+ {
846
+ return indicate (BLE_CONN_HANDLE_INVALID, data, len);
847
+ }
848
+
849
+ bool BLECharacteristic::indicate (const char * str)
850
+ {
851
+ return indicate (BLE_CONN_HANDLE_INVALID, str);
852
+ }
853
+
854
+ bool BLECharacteristic::indicate8 (uint8_t num)
855
+ {
856
+ return indicate8 (BLE_CONN_HANDLE_INVALID, num);
857
+ }
858
+
859
+ bool BLECharacteristic::indicate16 (uint16_t num)
860
+ {
861
+ return indicate16 (BLE_CONN_HANDLE_INVALID, num);
862
+ }
863
+
864
+ bool BLECharacteristic::indicate32 (uint32_t num)
865
+ {
866
+ return indicate32 (BLE_CONN_HANDLE_INVALID, num);
867
+ }
868
+
869
+ bool BLECharacteristic::indicate32 (int num)
870
+ {
871
+ return indicate32 (BLE_CONN_HANDLE_INVALID, num);
839
872
}
0 commit comments