wiegand.h
Go to the documentation of this file.
00001 #ifndef WIEGAND_H
00002 #define WIEGAND_H
00003 
00004 #include <stdint.h>
00005 
00006 typedef void (*Pi_Wieg_CB_t)(int, uint32_t);
00007 
00008 struct _Pi_Wieg_s;
00009 
00010 typedef struct _Pi_Wieg_s Pi_Wieg_t;
00011 
00012 Pi_Wieg_t *Pi_Wieg(int gpio_0, int gpio_1, Pi_Wieg_CB_t callback, int timeout);
00013    /*
00014       This function establishes a Wiegand decoder on gpio_0 and gpio_1.
00015 
00016       A gap of timeout milliseconds without a new bit indicates the
00017       end of a code.
00018 
00019       When the code is ended the callback function is called with the code
00020       bit length and value.
00021 
00022       A pointer to a private data type is returned.  This should be passed
00023       to Pi_Wieg_cancel if the decoder is to be cancelled.
00024    */
00025 
00026 void Pi_Wieg_cancel(Pi_Wieg_t *wieg);
00027    /*
00028       This function releases the resources used by the decoder.
00029    */
00030 
00031 #endif
00032 


cob_hand_bridge
Author(s): Mathias Lüdtke
autogenerated on Thu Jun 6 2019 20:43:57