00001 #ifndef IR_HASHER_H 00002 #define IR_HASHER_H 00003 00004 #include <stdint.h> 00005 00006 typedef void (*Pi_Hasher_CB_t)(uint32_t); 00007 00008 struct _Pi_Hasher_s; 00009 00010 typedef struct _Pi_Hasher_s Pi_Hasher_t; 00011 00012 Pi_Hasher_t * Pi_Hasher(int gpio, Pi_Hasher_CB_t callback, int timeout); 00013 /* 00014 This function establishes an IR hasher on the gpio. 00015 00016 A gap of timeout milliseconds without a new bit indicates 00017 the end of a code. 00018 00019 When code end is detected the callback function is called 00020 with the code hash. 00021 00022 A pointer to a private data type is returned. This should be passed 00023 to Pi_Hasher_cancel if the hasher is to be cancelled. 00024 */ 00025 00026 00027 void Pi_Hasher_cancel(Pi_Hasher_t *hasher); 00028 /* 00029 This function releases the resources used by the hasher. 00030 */ 00031 00032 00033 #endif