@@ -146,8 +146,9 @@ class BLEPeripheral{
146146 * @return BleStatus indicating success or error
147147 *
148148 * @note This method must be called before the begin method
149+ * Only need check return value at first call. Memory only alloc at first call
149150 */
150- void addAttribute (BLEAttribute& attribute);
151+ BleStatus addAttribute (BLEAttribute& attribute);
151152
152153 /* *
153154 * Provide a function to be called when events related to this Device are raised
@@ -195,35 +196,35 @@ class BLEPeripheral{
195196 */
196197 bool connected (void );
197198
198- /* *
199- * @brief Init the ADV data and start send advertisement
200- *
201- * @param none
202- *
203- * @return BleStatus 0 - Success. Others - error code
204- *
205- * @note none
206- */
199+ /* *
200+ * @brief Init the ADV data and start send advertisement
201+ *
202+ * @param none
203+ *
204+ * @return BleStatus 0 - Success. Others - error code
205+ *
206+ * @note none
207+ */
207208 BleStatus startAdvertising (void );
208-
209- /* *
210- * @brief Stop send advertisement
211- *
212- * @param none
213- *
214- * @return BleStatus 0 - Success. Others - error code
215- *
216- * @note none
217- */
218- BleStatus stopAdvertising (void );
219-
209+
210+ /* *
211+ * @brief Stop send advertisement
212+ *
213+ * @param none
214+ *
215+ * @return BleStatus 0 - Success. Others - error code
216+ *
217+ * @note none
218+ */
219+ BleStatus stopAdvertising (void );
220+
220221protected:
221222 void handleConnectEvent (struct bt_conn *conn, uint8_t err);
222223 void handleDisconnectEvent (struct bt_conn *conn, uint8_t reason);
223224 void handleParamUpdated (struct bt_conn *conn,
224225 uint16_t interval,
225- uint16_t latency,
226- uint16_t timeout);
226+ uint16_t latency,
227+ uint16_t timeout);
227228
228229private:
229230
0 commit comments