File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -971,6 +971,15 @@ void NimBLEDevice::deinit(bool clearAll) {
971971 }
972972} // deinit
973973
974+ /* *
975+ * @brief Set the BLEDevice's name
976+ * @param [in] deviceName The device name of the device.
977+ */
978+ /* STATIC */
979+ void NimBLEDevice::setDeviceName (const std::string &deviceName) {
980+ ble_svc_gap_device_name_set (deviceName.c_str ());
981+ } // setDeviceName
982+
974983
975984/* *
976985 * @brief Check if the initialization is complete.
Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ class NimBLEDevice {
9797public:
9898 static void init (const std::string &deviceName);
9999 static void deinit (bool clearAll = false );
100+ static void setDeviceName (const std::string &deviceName);
100101 static bool getInitialized ();
101102 static NimBLEAddress getAddress ();
102103 static std::string toString ();
You can’t perform that action at this time.
0 commit comments