Pull-up DATA to deal with controller unplug

This commit is contained in:
Neale Pickett 2014-02-03 19:53:46 -07:00
parent 01fa654c45
commit e3404275bb
2 changed files with 6 additions and 1 deletions

View File

@ -13,4 +13,5 @@ Fixed
5. Make setup mode less confusing
6. Allow jam clock adjustments in setup
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
View File

@ -39,6 +39,10 @@ avr_init(void)
TCCR1B |= _BV(CS11) | _BV(CS10); // prescale: clk_io / 64
TIMSK1 |= _BV(OCIE1A);
// Pull-up NES data line
bit(PORTA, _BV(NESOUT), true);
// Turn on Power Supply
bit(PORTA, _BV(7), true);
PORTB = 0xff;