File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -365,7 +365,30 @@ int ti_IsArchived(uint8_t handle);
365365 * @warning Archiving a variable can cause a garbage collection cycle.
366366 * You should use ti_SetGCBehavior to catch this event.
367367 */
368- int ti_SetArchiveStatus (bool archive , uint8_t handle );
368+ int ti_SetArchiveStatus (uint8_t archive , uint8_t handle );
369+
370+ /**
371+ * Moves an AppVar/variable between archive or RAM storage.
372+ * \rst
373+ * +-------------+-----------------------------------------+
374+ * | **archive** | **Description** |
375+ * +-------------+-----------------------------------------+
376+ * | true | Store AppVar/variable in archive. |
377+ * +-------------+-----------------------------------------+
378+ * | false | Store AppVar/variable in RAM. |
379+ * +-------------+-----------------------------------------+
380+ * \endrst
381+ * @param[in] archive Documented in the above table.
382+ * @param[in] handle AppVar/variable handle.
383+ * @returns `0` on failure.
384+ *
385+ * @warning Archiving a variable can cause a garbage collection cycle.
386+ * You should use ti_SetGCBehavior to catch this event.
387+ *
388+ * @note This macro wraps ti_SetArchiveStatus, and ensures that `archive` is
389+ * passed into ti_SetArchiveStatus correctly.
390+ */
391+ #define ti_SetArchiveStatus (archive , handle ) ti_SetArchiveStatus((bool)(archive), (handle))
369392
370393/**
371394 * Deletes an AppVar.
You can’t perform that action at this time.
0 commit comments