]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lib.git/blobdiff - rpp/include/rpp/mout.h
Make the RPP layer thread safe
[pes-rpp/rpp-lib.git] / rpp / include / rpp / mout.h
index a51cb4ee86ac3060d562c873f0fd075576996dd0..1250dd82fd7c9605c6ed5c565fbc6cee3c8173bf 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_mout_init();
 /**
  * Set the output of given pin to given value.
  *
+ * The function is thread safe, unless compiled with -DRPP_THREADSAFE=0.
+ *
  * This function will also verify if a faulty condition is detected. See return
  * documentation below for details.
  *
@@ -47,6 +51,8 @@ int8_t rpp_mout_set(uint8_t pin, uint8_t val);
 /**
  * Get the cached value of the given pin set by rpp_mout_set().
  *
+ * The function is thread safe, unless compiled with -DRPP_THREADSAFE=0.
+ *
  * This will not read the value on the pin. To confirm if the output is
  * correctly set call rpp_mout_diag() and confirm SUCCESS.
  *
@@ -61,6 +67,8 @@ int8_t rpp_mout_get(uint8_t pin);
 /**
  * Reads the value on the given diagnostic pin.
  *
+ * The function is thread safe, unless compiled with -DRPP_THREADSAFE=0.
+ *
  * Note that rpp_mout_set() calls this routine already before returning.
  *
  * @param[in] pin       The pin number to read [1-6].