X-Git-Url: http://rtime.felk.cvut.cz/gitweb/pes-rpp/rpp-lib.git/blobdiff_plain/9ebcc693fb87247af18d94ba3c65229187f73a94..573021795371f41a23ed0fe0b5171f38bb96d86e:/rpp/include/rpp/dac.h diff --git a/rpp/include/rpp/dac.h b/rpp/include/rpp/dac.h index a8dd064..adcffb8 100644 --- a/rpp/include/rpp/dac.h +++ b/rpp/include/rpp/dac.h @@ -26,6 +26,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. */ @@ -37,6 +39,8 @@ int8_t rpp_dac_init(); * * Call rpp_dac_update() to commit setup changes to real hardware. * + * The function is thread safe, unless compiled with -DRPP_THREADSAFE=0 + * * @param[in] pin The pin number to setup [1-4]. * @param[in] enabled TRUE to enable pin or FALSE to disable it. * @@ -51,6 +55,8 @@ int8_t rpp_dac_setup(uint8_t pin, boolean_t enabled); * * Call rpp_dac_update() to flush cached values to real hardware. * + * The function is thread safe, unless compiled with -DRPP_THREADSAFE=0 + * * @param[in] pin The pin number to set [1-4]. * @param[in] val The value to be set [0-4095] (DAC is 12bit resolution). * @@ -71,6 +77,8 @@ int8_t rpp_dac_set(uint8_t pin, uint16_t val); * * Helper function that calculates DAC value given a voltage in millivolts. * + * The function is thread safe, unless compiled with -DRPP_THREADSAFE=0 + * * @param[in] pin The pin number to set [1-4]. * @param[in] mv Voltage level in mV to be set on specified pin [0-12000]. * @@ -84,6 +92,8 @@ int8_t rpp_dac_set_voltage(uint8_t pin, uint16_t mv); /** * Flush cached output values and configuration changes. * + * The function is thread safe, unless compiled with -DRPP_THREADSAFE=0 + * * @bug This function should be called only after the FreeRTOS Scheduler has * started (which implies from a FreeRTOS Task). If called before starting the * scheduler, like for library initialization, or application DAC