*\r
* Copyright (c) 2009-2011 Frank Meyer - frank(at)fli4l.de\r
*\r
- * $Id: irmp.h,v 1.64 2011/08/16 07:51:19 fm Exp $\r
+ * $Id: irmp.h,v 1.65 2011/09/08 13:22:16 fm Exp $\r
*\r
* ATMEGA88 @ 8 MHz\r
*\r
#ifndef _WC_IRMP_H_\r
#define _WC_IRMP_H_\r
\r
-#ifdef __cplusplus\r
-extern "C"\r
-{\r
-#endif\r
-\r
/*---------------------------------------------------------------------------------------------------------------------------------------------------\r
* timing constants:\r
*---------------------------------------------------------------------------------------------------------------------------------------------------\r
#define IRMP_LEGO_PROTOCOL 29 // LEGO Power Functions RC\r
#define IRMP_THOMSON_PROTOCOL 30 // Thomson\r
#define IRMP_MERLIN_PROTOCOL 31 // Pollin Merlin keyboard (bitserial)\r
+\r
+#define IRMP_N_PROTOCOLS 31 // number of supported protocols\r
+\r
#define IRMP_IMON_PROTOCOL 99 // Imon (bitserial) PROTOTYPE!\r
\r
// some flags of struct IRMP_PARAMETER:\r
uint8_t flags; // flags, e.g. repetition\r
} IRMP_DATA;\r
\r
+extern void irmp_init (void);\r
+extern uint8_t irmp_get_data (IRMP_DATA *);\r
+extern uint8_t irmp_is_busy (void);\r
+extern uint8_t irmp_ISR (void);\r
\r
-/**\r
- * Initialize IRMP decoder\r
- * @details Configures IRMP input pin\r
- */\r
-extern void irmp_init (void);\r
-\r
-/**\r
- * Get IRMP data\r
- * @details gets decoded IRMP data\r
- * @param pointer in order to store IRMP data\r
- * @return TRUE: successful, FALSE: failed\r
- */\r
-extern uint8_t irmp_get_data (IRMP_DATA *);\r
-\r
-/**\r
- * ISR routine\r
- * @details ISR routine, called 10000 times per second\r
- */\r
-extern uint8_t irmp_ISR (void);\r
-\r
-#ifdef __cplusplus\r
-}\r
+#if IRMP_PROTOCOL_NAMES == 1\r
+extern char * irmp_protocol_names[IRMP_N_PROTOCOLS + 1];\r
#endif\r
\r
+#if IRMP_USE_CALLBACK == 1\r
+extern void irmp_set_callback_ptr (void (*cb)(uint8_t));\r
+#endif // IRSND_USE_CALLBACK == 1\r
+\r
#endif /* _WC_IRMP_H_ */\r