+/*---------------------------------------------------------------------------------------------------------------------------------------------------\r
+ * ATmega pin definition of OC2 / OC2A / OC2B\r
+ *---------------------------------------------------------------------------------------------------------------------------------------------------\r
+ */\r
+#if defined (__AVR_ATmega8__) // ATmega8 uses OC2 = PB3\r
+#undef IRSND_OC2 // has no OC2A / OC2B\r
+#define IRSND_OC2 0 // magic: use OC2\r
+#define IRSND_PORT PORTB // port B\r
+#define IRSND_DDR DDRB // ddr B\r
+#define IRSND_BIT 3 // OC2A\r
+\r
+#elif defined (__AVR_ATmega16__) \\r
+ || defined (__AVR_ATmega32__) // ATmega16|32 uses OC2 = PD7\r
+#undef IRSND_OC2 // has no OC2A / OC2B\r
+#define IRSND_OC2 0 // magic: use OC2\r
+#define IRSND_PORT PORTD // port D\r
+#define IRSND_DDR DDRD // ddr D\r
+#define IRSND_BIT 7 // OC2\r
+\r
+#elif defined (__AVR_ATmega162__) // ATmega162 uses OC2 = PB1\r
+#undef IRSND_OC2 // has no OC2A / OC2B\r
+#define IRSND_OC2 0 // magic: use OC2\r
+#define IRSND_PORT PORTB // port B\r
+#define IRSND_DDR DDRB // ddr B\r
+#define IRSND_BIT 1 // OC2\r
+\r
+#elif defined (__AVR_ATmega164__) \\r
+ || defined (__AVR_ATmega324__) \\r
+ || defined (__AVR_ATmega644__) \\r
+ || defined (__AVR_ATmega644P__) \\r
+ || defined (__AVR_ATmega1284__) // ATmega164|324|644|644P|1284 uses OC2A = PD7 or OC2B = PD6\r
+#if IRSND_OC2 == 1 // OC2A\r
+#define IRSND_PORT PORTD // port D\r
+#define IRSND_DDR DDRD // ddr D\r
+#define IRSND_BIT 7 // OC2A\r
+#elif IRSND_OC2 == 2 // OC2B\r
+#define IRSND_PORT PORTD // port D\r
+#define IRSND_DDR DDRD // ddr D\r
+#define IRSND_BIT 6 // OC2B\r
+#else\r
+#error Wrong value for IRSND_OC2, choose 1 or 2 in irsndconfig.h\r
+#endif // IRSND_OC2\r
+\r
+#elif defined (__AVR_ATmega48__) \\r
+ || defined (__AVR_ATmega88__) \\r
+ || defined (__AVR_ATmega168__) \\r
+ || defined (__AVR_ATmega168__) \\r
+ || defined (__AVR_ATmega328__) \\r
+ || defined (__AVR_ATmega328P__) // ATmega48|88|168|328P uses OC2A = PB3 or OC2B = PD3\r
+#if IRSND_OC2 == 1 // OC2A\r
+#define IRSND_PORT PORTB // port B\r
+#define IRSND_DDR DDRB // ddr B\r
+#define IRSND_BIT 3 // OC2A\r
+#elif IRSND_OC2 == 2 // OC2B\r
+#define IRSND_PORT PORTD // port D\r
+#define IRSND_DDR DDRD // ddr D\r
+#define IRSND_BIT 3 // OC2B\r
+#else\r
+#error Wrong value for IRSND_OC2, choose 1 or 2 in irsndconfig.h\r
+#endif // IRSND_OC2\r
+\r
+#else\r
+#if !defined (unix) && !defined (WIN32)\r
+#error OC2A/OC2B not defined, please fill in definitions here.\r
+#endif // unix, WIN32\r
+#endif // __AVR...\r
+\r