Fix backlight issue for gh60 revB
This commit is contained in:
parent
ab3349724e
commit
54028c2b65
@ -82,6 +82,8 @@ void backlight_set(uint8_t level)
|
||||
DDRF |= (1<<PF7 | 1<<PF6 | 1<<PF5 | 1<<PF4);
|
||||
PORTF |= (1<<PF7 | 1<<PF6 | 1<<PF5 | 1<<PF4);
|
||||
cli();
|
||||
TCCR1A |= (1<<WGM10);
|
||||
TCCR1B |= ((1<<CS11) | (1<<CS10));
|
||||
TIMSK1 |= ((1<<OCIE1A) | (1<<TOIE1));
|
||||
TIFR1 |= (1<<TOV1);
|
||||
sei();
|
||||
@ -90,6 +92,8 @@ void backlight_set(uint8_t level)
|
||||
else {
|
||||
DDRF &= ~(1<<PF7 | 1<<PF6 | 1<<PF5 | 1<<PF4);
|
||||
cli();
|
||||
TCCR1A &= ~(1<<WGM10);
|
||||
TCCR1B &= ~((1<<CS11) | (1<<CS10));
|
||||
TIMSK1 |= ((1<<OCIE1A) | (1<<TOIE1));
|
||||
TIFR1 |= (1<<TOV1);
|
||||
sei();
|
||||
|
@ -42,13 +42,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#define DEBOUNCE 5
|
||||
|
||||
/* number of backlight levels */
|
||||
#if defined(GH60_REV_CHN)
|
||||
# define BACKLIGHT_LEVELS 3
|
||||
#elif defined(GH60_REV_CNY)
|
||||
# define BACKLIGHT_LEVELS 3
|
||||
#else
|
||||
# define BACKLIGHT_LEVELS 1
|
||||
#endif
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
|
||||
#ifdef GH60_REV_CNY
|
||||
# define LED_MATRIX_ROWS 6
|
||||
|
Reference in New Issue
Block a user