Pull-up DATA to deal with controller unplug
This commit is contained in:
parent
01fa654c45
commit
e3404275bb
|
@ -14,3 +14,4 @@ Fixed
|
||||||
6. Allow jam clock adjustments in setup
|
6. Allow jam clock adjustments in setup
|
||||||
7. Unified build with multiple firmware targets
|
7. Unified build with multiple firmware targets
|
||||||
8. Debounce buttons
|
8. Debounce buttons
|
||||||
|
9. Pull-up NES data to prevent going apeshit when you unplug the controller
|
||||||
|
|
4
avr.c
4
avr.c
|
@ -39,6 +39,10 @@ avr_init(void)
|
||||||
TCCR1B |= _BV(CS11) | _BV(CS10); // prescale: clk_io / 64
|
TCCR1B |= _BV(CS11) | _BV(CS10); // prescale: clk_io / 64
|
||||||
TIMSK1 |= _BV(OCIE1A);
|
TIMSK1 |= _BV(OCIE1A);
|
||||||
|
|
||||||
|
// Pull-up NES data line
|
||||||
|
bit(PORTA, _BV(NESOUT), true);
|
||||||
|
|
||||||
|
// Turn on Power Supply
|
||||||
bit(PORTA, _BV(7), true);
|
bit(PORTA, _BV(7), true);
|
||||||
|
|
||||||
PORTB = 0xff;
|
PORTB = 0xff;
|
||||||
|
|
Loading…
Reference in New Issue