]> cloudbase.mooo.com Git - irmp.git/blobdiff - irmp.h
version 2.0.0-pre6: added support for ATtiny85, removed support for codevision, added...
[irmp.git] / irmp.h
diff --git a/irmp.h b/irmp.h
index 619826380e0735ee9bac3c27e9036a9d058c1933..fdb2c9500dc1792a01c17acb7ccdbefa64a3a00a 100644 (file)
--- a/irmp.h
+++ b/irmp.h
 #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
@@ -79,6 +74,9 @@ typedef uint8_t     PAUSE_LEN;
 #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
@@ -527,29 +525,13 @@ typedef struct
   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
 #endif /* _WC_IRMP_H_ */\r