X-Git-Url: http://cloudbase.mooo.com/gitweb/irmp.git/blobdiff_plain/03780b34ba14fb64f369e677a2548ac2b130cccd..7644ac04e209441d89d900125995b2d398cfd4b4:/irmp.h diff --git a/irmp.h b/irmp.h index 6198263..7504907 100644 --- a/irmp.h +++ b/irmp.h @@ -3,7 +3,7 @@ * * Copyright (c) 2009-2011 Frank Meyer - frank(at)fli4l.de * - * $Id: irmp.h,v 1.64 2011/08/16 07:51:19 fm Exp $ + * $Id: irmp.h,v 1.65 2011/09/08 13:22:16 fm Exp $ * * ATMEGA88 @ 8 MHz * @@ -17,11 +17,6 @@ #ifndef _WC_IRMP_H_ #define _WC_IRMP_H_ -#ifdef __cplusplus -extern "C" -{ -#endif - /*--------------------------------------------------------------------------------------------------------------------------------------------------- * timing constants: *--------------------------------------------------------------------------------------------------------------------------------------------------- @@ -79,6 +74,9 @@ typedef uint8_t PAUSE_LEN; #define IRMP_LEGO_PROTOCOL 29 // LEGO Power Functions RC #define IRMP_THOMSON_PROTOCOL 30 // Thomson #define IRMP_MERLIN_PROTOCOL 31 // Pollin Merlin keyboard (bitserial) + +#define IRMP_N_PROTOCOLS 31 // number of supported protocols + #define IRMP_IMON_PROTOCOL 99 // Imon (bitserial) PROTOTYPE! // some flags of struct IRMP_PARAMETER: @@ -527,29 +525,17 @@ typedef struct uint8_t flags; // flags, e.g. repetition } IRMP_DATA; +extern void irmp_init (void); +extern uint8_t irmp_get_data (IRMP_DATA *); +extern uint8_t irmp_is_busy (void); +extern uint8_t irmp_ISR (void); -/** - * Initialize IRMP decoder - * @details Configures IRMP input pin - */ -extern void irmp_init (void); - -/** - * Get IRMP data - * @details gets decoded IRMP data - * @param pointer in order to store IRMP data - * @return TRUE: successful, FALSE: failed - */ -extern uint8_t irmp_get_data (IRMP_DATA *); - -/** - * ISR routine - * @details ISR routine, called 10000 times per second - */ -extern uint8_t irmp_ISR (void); - -#ifdef __cplusplus -} +#if IRMP_PROTOCOL_NAMES == 1 +extern char * irmp_protocol_names[IRMP_N_PROTOCOLS + 1]; #endif +#if IRMP_USE_CALLBACK == 1 +extern void irmp_set_callback_ptr (void (*cb)(uint8_t)); +#endif // IRSND_USE_CALLBACK == 1 + #endif /* _WC_IRMP_H_ */