Main Page
Namespaces
Classes
Files
File List
File Members
client
pigpio
EXAMPLES
C
ROTARY_ENCODER
rotary_encoder.h
Go to the documentation of this file.
1
#ifndef ROTARY_ENCODER_H
2
#define ROTARY_ENCODER_H
3
4
typedef
void (*
Pi_Renc_CB_t
)(int);
5
6
struct
_Pi_Renc_s
;
7
8
typedef
struct
_Pi_Renc_s
Pi_Renc_t
;
9
10
Pi_Renc_t
*
Pi_Renc
(
int
gpioA
,
int
gpioB
,
Pi_Renc_CB_t
callback
);
11
/*
12
This function establishes a rotary encoder on gpioA and gpioB.
13
14
When the encoder is turned the callback function is called.
15
16
A pointer to a private data type is returned. This should be passed
17
to Pi_Renc_cancel if the rotary encoder is to be cancelled.
18
*/
19
20
void
Pi_Renc_cancel
(
Pi_Renc_t
*renc);
21
/*
22
This function releases the resources used by the decoder.
23
*/
24
25
#endif
Pi_Renc_CB_t
void(* Pi_Renc_CB_t)(int)
Definition:
rotary_encoder.h:4
callback
void callback(uint32_t hash)
Definition:
test_ir_hasher.c:23
Pi_Renc_cancel
void Pi_Renc_cancel(Pi_Renc_t *renc)
Definition:
rotary_encoder.c:84
_Pi_Renc_s::gpioA
int gpioA
Definition:
rotary_encoder.c:10
_Pi_Renc_s
Definition:
rotary_encoder.c:8
Pi_Renc
Pi_Renc_t * Pi_Renc(int gpioA, int gpioB, Pi_Renc_CB_t callback)
Definition:
rotary_encoder.c:57
_Pi_Renc_s::gpioB
int gpioB
Definition:
rotary_encoder.c:11
cob_hand_bridge
Author(s): Mathias Lüdtke
autogenerated on Tue Oct 20 2020 03:35:57