Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note

The QSL is currently meant to be run in a single threaded environment, thus you can just use stub functions for the prototypes in dn_lock.h. If you wish to run the QSL in a multi-threaded environment, you should create your own mutex (separate from the prototypes in dn_lock.h) to be locked/unlocked before/after calls to the QSL API.

Panel

C Library Specific

Refer to the dustcloud documentation for further details on how to port the prototypes in these headers.

Panel

QuickStart Library Specific

Code Block
languagecpp
titledn_time.h
uint32_t dn_time_ms(void):
void dn_sleep_ms(uint32_t milliseconds);

These functions allows the QSL to perform timing, schedule tasks and sleep to save power.

  • time_ms: Simply needs to return time in milliseconds. The absolute value is irrelevant; as long as the time returned from subsequent calls will differ by the actual time passed between them.
  • sleep_ms: Make the CPU sleep for the set number of milliseconds.

 

Code Block
languagecpp
titledn_watchdog.h
void dn_watchdog_feed(void);

This function allows the QSL to make sure any watchdog in the user application is fed during processes that can take some time (e.g. searching for a network).

  • watchdog_feed: Feed any watchdog that might be implemented in the platform; simply use stub function if none.