X-Git-Url: http://cloudbase.mooo.com/gitweb/irmp.git/blobdiff_plain/08f2dd9d18830e4671dd99ac04569c6dd9895b98..cb93f9e9e7b2cc102071423a590cc4a57c06657c:/irsnd.h diff --git a/irsnd.h b/irsnd.h index 88f6d31..28f90df 100644 --- a/irsnd.h +++ b/irsnd.h @@ -1,9 +1,9 @@ /*--------------------------------------------------------------------------------------------------------------------------------------------------- * irsnd.h * - * Copyright (c) 2010-2012 Frank Meyer - frank(at)fli4l.de + * Copyright (c) 2010-2013 Frank Meyer - frank(at)fli4l.de * - * $Id: irsnd.h,v 1.12 2012/05/23 12:26:26 fm Exp $ + * $Id: irsnd.h,v 1.17 2014/02/19 12:57:36 fm Exp $ * * ATMEGA88 @ 8 MHz * @@ -37,6 +37,7 @@ # endif # define IRSND_BIT CONCAT(GPIO_Pin_, IRSND_BIT_NUMBER) # define IRSND_TIMER CONCAT(TIM, IRSND_TIMER_NUMBER) +# define IRSND_TIMER_CHANNEL CONCAT(TIM_Channel_, IRSND_TIMER_CHANNEL_NUMBER) # if ((IRSND_TIMER_NUMBER >= 2) && (IRSND_TIMER_NUMBER <= 5)) || ((IRSND_TIMER_NUMBER >= 12) && (IRSND_TIMER_NUMBER <= 14)) # define IRSND_TIMER_RCC CONCAT(RCC_APB1Periph_TIM, IRSND_TIMER_NUMBER) # elif (IRSND_TIMER_NUMBER == 1) || ((IRSND_TIMER_NUMBER >= 8) && (IRSND_TIMER_NUMBER <= 11)) @@ -52,12 +53,16 @@ // Do not change lines below until you have a different HW. Example is for 18F2550/18F4550 // setup macro for PWM used PWM module # if IRSND_OCx == IRSND_PIC_CCP2 +# define PWMon() TMR2=0,CCP2CON |=0b1100 +# define PWMoff() CCP2CON &=(~0b1100) # define IRSND_PIN TRISCbits.TRISC1 // RC1 = PWM2 # define SetDCPWM(x) SetDCPWM2(x) # define ClosePWM ClosePWM2 # define OpenPWM(x) OpenPWM2(x) # endif # if IRSND_OCx == IRSND_PIC_CCP1 +# define PWMon() TMR2=0,CCP1CON |=0b1100 +# define PWMoff() CCP1CON &=(~0b1100) # define IRSND_PIN TRISCbits.TRISC2 // RC2 = PWM1 # define SetDCPWM(x) SetDCPWM1(x) # define ClosePWM ClosePWM1 @@ -81,14 +86,20 @@ # define IRSND_SUPPORT_SIEMENS_PROTOCOL 0 #endif -#if IRSND_SUPPORT_RECS80_PROTOCOL == 1 && F_INTERRUPTS < 20000 -# warning F_INTERRUPTS too low, RECS80 protocol disabled (should be at least 20000) +#if IRSND_SUPPORT_A1TVBOX_PROTOCOL == 1 && F_INTERRUPTS < 15000 +# warning F_INTERRUPTS too low, A1TVBOX protocol disabled (should be at least 15000) +# undef IRSND_SUPPORT_A1TVBOX_PROTOCOL +# define IRSND_SUPPORT_A1TVBOX_PROTOCOL 0 +#endif + +#if IRSND_SUPPORT_RECS80_PROTOCOL == 1 && F_INTERRUPTS < 15000 +# warning F_INTERRUPTS too low, RECS80 protocol disabled (should be at least 15000) # undef IRSND_SUPPORT_RECS80_PROTOCOL # define IRSND_SUPPORT_RECS80_PROTOCOL 0 #endif -#if IRSND_SUPPORT_RECS80EXT_PROTOCOL == 1 && F_INTERRUPTS < 20000 -# warning F_INTERRUPTS too low, RECS80EXT protocol disabled (should be at least 20000) +#if IRSND_SUPPORT_RECS80EXT_PROTOCOL == 1 && F_INTERRUPTS < 15000 +# warning F_INTERRUPTS too low, RECS80EXT protocol disabled (should be at least 15000) # undef IRSND_SUPPORT_RECS80EXT_PROTOCOL # define IRSND_SUPPORT_RECS80EXT_PROTOCOL 0 #endif