diff --git a/avr/cores/tiny/wiring_analog.c b/avr/cores/tiny/wiring_analog.c index 21bb3014..9c12efe9 100644 --- a/avr/cores/tiny/wiring_analog.c +++ b/avr/cores/tiny/wiring_analog.c @@ -115,7 +115,7 @@ void analogWrite(uint8_t pin, int val) if( timer == TIMER0A){ // connect pwm to pin on timer 0, channel A sbi(TCCR0A, COM0A1); - cbi(TCCR0A, COM0A0); + //cbi(TCCR0A, COM0A0); OCR0A = val; // set pwm duty } else #endif @@ -124,7 +124,7 @@ void analogWrite(uint8_t pin, int val) if( timer == TIMER0B){ // connect pwm to pin on timer 0, channel B sbi(TCCR0A, COM0B1); - cbi(TCCR0A, COM0B0); + //cbi(TCCR0A, COM0B0); OCR0B = val; // set pwm duty } else #endif @@ -135,7 +135,7 @@ void analogWrite(uint8_t pin, int val) if( timer == TIMER1A){ // connect pwm to pin on timer 1, channel A sbi(TCCR1A, COM1A1); - cbi(TCCR1A, COM1A0); + //cbi(TCCR1A, COM1A0); #ifdef OC1AX cbi(TCCR1D, OC1AV); cbi(TCCR1D, OC1AU); @@ -172,7 +172,7 @@ void analogWrite(uint8_t pin, int val) if(timer == TIMER1A){ // connect pwm to pin on timer 1, channel A sbi(TCCR1, COM1A1); - cbi(TCCR1, COM1A0); + //cbi(TCCR1, COM1A0); OCR1A = val; // set pwm duty } else #endif @@ -181,7 +181,7 @@ void analogWrite(uint8_t pin, int val) if( timer == TIMER1B){ // connect pwm to pin on timer 1, channel B sbi(TCCR1A, COM1B1); - cbi(TCCR1A, COM1B0); + //cbi(TCCR1A, COM1B0); #ifdef OC1BV sbi(TCCR1D, OC1BV); cbi(TCCR1D, OC1BU); @@ -196,7 +196,7 @@ void analogWrite(uint8_t pin, int val) if( timer == TIMER1B){ // connect pwm to pin on timer 1, channel B sbi(GTCCR, COM1B1); - cbi(GTCCR, COM1B0); + //cbi(GTCCR, COM1B0); OCR1B = val; // set pwm duty } else #endif diff --git a/avr/cores/tiny/wiring_digital.c b/avr/cores/tiny/wiring_digital.c index f6b8da8d..853e0c38 100644 --- a/avr/cores/tiny/wiring_digital.c +++ b/avr/cores/tiny/wiring_digital.c @@ -66,21 +66,21 @@ static void turnOffPWM(uint8_t timer) #if defined(TCCR0A) && defined(COM0A1) if( timer == TIMER0A){ cbi(TCCR0A, COM0A1); - cbi(TCCR0A, COM0A0); + //cbi(TCCR0A, COM0A0); } else #endif #if defined(TCCR0A) && defined(COM0B1) if( timer == TIMER0B){ cbi(TCCR0A, COM0B1); - cbi(TCCR0A, COM0B0); + //cbi(TCCR0A, COM0B0); } else #endif #if defined(TCCR1A) && defined(COM1A1) if( timer == TIMER1A){ cbi(TCCR1A, COM1A1); - cbi(TCCR1A, COM1A0); + //cbi(TCCR1A, COM1A0); } else #endif #if defined(TCCR1E) //attiny861 @@ -104,7 +104,7 @@ static void turnOffPWM(uint8_t timer) #if defined(TCCR1) && defined(COM1A1) if(timer == TIMER1A){ cbi(TCCR1, COM1A1); - cbi(TCCR1, COM1A0); + //cbi(TCCR1, COM1A0); #ifdef OC1AX cbi(TCCR1D, OC1AX); #endif @@ -114,7 +114,7 @@ static void turnOffPWM(uint8_t timer) #if defined(TCCR1A) && defined(COM1B1) if( timer == TIMER1B){ cbi(TCCR1A, COM1B1); - cbi(TCCR1A, COM1B0); + //cbi(TCCR1A, COM1B0); #ifdef OC1BV cbi(TCCR1D, OC1BV); #endif @@ -124,7 +124,7 @@ static void turnOffPWM(uint8_t timer) #if defined(TCCR1) && defined(COM1B1) if( timer == TIMER1B){ cbi(GTCCR, COM1B1); - cbi(GTCCR, COM1B0); + //cbi(GTCCR, COM1B1); } else #endif