Subversion Repositories group.electronics

Rev

Rev 82 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 82 Rev 83
Line 168... Line 168...
168
				sbi(currleds, i);
168
				sbi(currleds, i);
169
			}
169
			}
170
		}
170
		}
171
		PORTB = currleds;
171
		PORTB = currleds;
172
		reportBuffer.buttons = debounce.buttons;
172
		reportBuffer.buttons = debounce.buttons;
173
		// Set a timeout for the keypress
173
		// Set debounce to wait to button up
174
		debounce.waitup = 1;
174
		debounce.waitup = 1;
175
	}
175
	}
176
 
176
 
177
	_delay_ms(1);
177
	_delay_ms(1);
178
    }
178
    }
Line 189... Line 189...
189
        if (rbi(PIND, 5) == 0) key = 1;
189
        if (rbi(PIND, 5) == 0) key = 1;
190
        if (rbi(PIND, 4) == 0) key = 2;
190
        if (rbi(PIND, 4) == 0) key = 2;
191
        if (rbi(PINA, 0) == 0) key = 4;
191
        if (rbi(PINA, 0) == 0) key = 4;
192
        if (rbi(PINA, 1) == 0) key = 8;
192
        if (rbi(PINA, 1) == 0) key = 8;
193
        sbi(PORTD, 0);
193
        sbi(PORTD, 0);
194
        _delay_us(10);
-
 
195
 
194
 
196
        cbi(PORTD, 1);
195
        cbi(PORTD, 1);
197
        _delay_us(10);
196
        _delay_us(10);
198
        if (rbi(PIND, 5) == 0) key = 16;
197
        if (rbi(PIND, 5) == 0) key = 16;
199
        if (rbi(PIND, 4) == 0) key = 32;
198
        if (rbi(PIND, 4) == 0) key = 32;