| 
    upm
    1.7.1
    
   Sensor/Actuator repository for libmraa (v2.0.0) 
   | 
 

Go to the source code of this file.
Data Structures | |
| struct | _rotaryencoder_context | 
Functions | |
| rotaryencoder_context | rotaryencoder_init (int pin_a, int pin_b) | 
| void | rotaryencoder_close (rotaryencoder_context dev) | 
| void | rotaryencoder_set_position (const rotaryencoder_context dev, int count) | 
| int | rotaryencoder_get_position (const rotaryencoder_context dev) | 
Typedefs | |
| typedef struct _rotaryencoder_context * | rotaryencoder_context | 
| rotaryencoder_context rotaryencoder_init | ( | int | pin_a, | 
| int | pin_b | ||
| ) | 
RotaryEncoder initialization
| pinA | Digital pin to use for signal A | 
| pinB | Digital pin to use for signal B | 

| void rotaryencoder_close | ( | rotaryencoder_context | dev | ) | 
RotaryEncoder close function

| void rotaryencoder_set_position | ( | const rotaryencoder_context | dev, | 
| int | count | ||
| ) | 
Resets the position to a given number.
| count | Integer to initialize the position to | 

| int rotaryencoder_get_position | ( | const rotaryencoder_context | dev | ) | 
Gets the position value.

| typedef struct _rotaryencoder_context * rotaryencoder_context | 
Device context
 1.8.11