mirror of
https://github.com/eclipse/upm.git
synced 2025-07-02 09:51:14 +03:00
docs: updated @param tags, added missing function descriptions, other minor changes
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
@ -51,13 +51,38 @@ typedef struct _rotary_context {
|
||||
|
||||
#define ROTARY_MAX_ANGLE 300
|
||||
|
||||
/**
|
||||
* Rotary angle sensor initialization function
|
||||
*
|
||||
* @param pin analog pin to use
|
||||
* @param aRef reference voltage
|
||||
* @return sensor context
|
||||
*/
|
||||
rotary_context rotary_init(int pin, float aRef);
|
||||
|
||||
/**
|
||||
* Rotary destructor
|
||||
*
|
||||
* @param dev sensor context pointer
|
||||
*/
|
||||
void rotary_close(rotary_context dev);
|
||||
|
||||
/**
|
||||
* Gets the voltage value from the analog pin
|
||||
*
|
||||
* @param dev sensor context pointer
|
||||
* @param volts sensor voltage value
|
||||
* @return result of the operation
|
||||
*/
|
||||
upm_result_t rotary_get_value_voltage(const rotary_context dev, float* volts);
|
||||
|
||||
// degrees only
|
||||
/**
|
||||
* Gets the position of the rotary angle sensor in degrees
|
||||
*
|
||||
* @param dev sensor context pointer
|
||||
* @param rotval sensor position in degrees
|
||||
* @return result of the operation
|
||||
*/
|
||||
upm_result_t rotary_get_value_angle(rotary_context dev, float* rotval);
|
||||
|
||||
#endif /* ROTARY_H_ */
|
||||
|
@ -34,7 +34,7 @@
|
||||
namespace upm {
|
||||
|
||||
/**
|
||||
* @brief Rotary library
|
||||
* @brief Rotary Angle Sensor library
|
||||
* @defgroup rotary libupm-rotary
|
||||
* @ingroup seeed analog ainput gsk
|
||||
*/
|
||||
@ -43,7 +43,7 @@ namespace upm {
|
||||
* @library rotary
|
||||
* @sensor rotary
|
||||
* @comname Rotary Angle Sensor
|
||||
* @altname Rotary Potentiometer
|
||||
* @altname Rotary Potentiometer, Grove Rotary Angle Sensor
|
||||
* @type ainput
|
||||
* @man seeed
|
||||
* @web http://wiki.seeed.cc/Grove-Rotary_Angle_Sensor/
|
||||
@ -52,9 +52,9 @@ namespace upm {
|
||||
*
|
||||
* @brief API for the Rotary Angle Sensor (Knob)
|
||||
*
|
||||
* Basic UPM module for the rotary angle sensor (knob) on analog. Provides
|
||||
* a set of functions to read the absolute pin value, degrees or radians, and another set
|
||||
* to do the same relative to the center of the knob's range.
|
||||
* Basic UPM module for the rotary angle sensor (knob) on analog. Provides a
|
||||
* set of functions to read the absolute pin value, degrees or radians, and
|
||||
* another set to do the same relative to the center of the knob's range.
|
||||
*
|
||||
* @image html rotary.jpg
|
||||
* @snippet rotary.cxx Interesting
|
||||
@ -62,7 +62,7 @@ namespace upm {
|
||||
class Rotary{
|
||||
public:
|
||||
/**
|
||||
* Grove rotary angle sensor constructor
|
||||
* Rotary angle sensor constructor
|
||||
*
|
||||
* @param pin Number of the analog pin to use
|
||||
*/
|
||||
|
Reference in New Issue
Block a user