Main Page
Namespaces
Classes
Files
File List
File Members
client
pigpio
EXAMPLES
C
WIEGAND_CODE
wiegand.h
Go to the documentation of this file.
1
#ifndef WIEGAND_H
2
#define WIEGAND_H
3
4
#include <stdint.h>
5
6
typedef
void (*
Pi_Wieg_CB_t
)(int, uint32_t);
7
8
struct
_Pi_Wieg_s
;
9
10
typedef
struct
_Pi_Wieg_s
Pi_Wieg_t
;
11
12
Pi_Wieg_t
*
Pi_Wieg
(
int
gpio_0,
int
gpio_1,
Pi_Wieg_CB_t
callback
,
int
timeout);
13
/*
14
This function establishes a Wiegand decoder on gpio_0 and gpio_1.
15
16
A gap of timeout milliseconds without a new bit indicates the
17
end of a code.
18
19
When the code is ended the callback function is called with the code
20
bit length and value.
21
22
A pointer to a private data type is returned. This should be passed
23
to Pi_Wieg_cancel if the decoder is to be cancelled.
24
*/
25
26
void
Pi_Wieg_cancel
(
Pi_Wieg_t
*wieg);
27
/*
28
This function releases the resources used by the decoder.
29
*/
30
31
#endif
32
_Pi_Wieg_s
Definition:
wiegand.c:7
Pi_Wieg_CB_t
void(* Pi_Wieg_CB_t)(int, uint32_t)
Definition:
wiegand.h:6
callback
void callback(uint32_t hash)
Definition:
test_ir_hasher.c:23
Pi_Wieg
Pi_Wieg_t * Pi_Wieg(int gpio_0, int gpio_1, Pi_Wieg_CB_t callback, int timeout)
Definition:
wiegand.c:84
Pi_Wieg_cancel
void Pi_Wieg_cancel(Pi_Wieg_t *wieg)
Definition:
wiegand.c:123
cob_hand_bridge
Author(s): Mathias Lüdtke
autogenerated on Tue Oct 20 2020 03:35:57