]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/blobdiff - rpp/include/rpp/lout.h
Make the RPP layer thread safe
[pes-rpp/rpp-lib.git] / rpp / include / rpp / lout.h
index 450c7901593617876f7c4ca0821a390ed53033f4..4873a73e6f7bfaecac075348644edf7cebfbc3f4 100644 (file)
@@ -17,6 +17,8 @@
  *
  * Call this method before using this module.
  *
+ * This function is not thread safe. Do not call it from multiple threads.
+ *
  * @return SUCCESS if initialization successful.\n
  *         FAILURE if module already initialized.
  */
@@ -26,6 +28,8 @@ int8_t rpp_lout_init();
 /**
  * Set the output cache of given pin to given value.
  *
+ * The function is thread safe, unless compiled with -DRPP_THREADSAFE=0.
+ *
  * Call rpp_lout_update() to flush cached values to real hardware.
  *
  * @param[in] pin       The pin number to set [1-8].
@@ -40,6 +44,8 @@ int8_t rpp_lout_set(uint8_t pin, uint8_t val);
 /**
  * Get the diagnostic cached value for given pin.
  *
+ * The function is thread safe, unless compiled with -DRPP_THREADSAFE=0.
+ *
  * Call rpp_lout_update() to update cached values.
  *
  * @param[in] pin       The pin number to read [1-8].
@@ -53,6 +59,8 @@ int8_t rpp_lout_diag(uint8_t pin);
 /**
  * Flush cached output values and read back diagnostic values of all pins.
  *
+ * The function is thread safe, unless compiled with -DRPP_THREADSAFE=0.
+ *
  * @return SUCCESS when transaction was successful.\n
  *         FAILURE if transaction could not be confirmed.
  */