Subversion Repositories group.electronics

Rev

Rev 106 | Rev 108 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 106 Rev 107
Line 23... Line 23...
23
#include "hiddesc.h"
23
#include "hiddesc.h"
24
 
24
 
25
#define BUTTONS	 		1
25
#define BUTTONS	 		1
26
 
26
 
27
#define LCD_UPDATE		11
27
#define LCD_UPDATE		11
-
 
28
#define ROTARY_TIME		50
28
 
29
 
29
void pcInterrupt(uint8_t);
30
void pcInterrupt(uint8_t);
30
uint8_t getKey(void);
31
uint8_t getKey(void);
31
void updateLcd();
32
void updateLcd();
32
void checkRotarys();
33
void checkRotarys();
Line 308... Line 309...
308
                && rbi(pcInt[pcint].current, PCINT17) == 0 
309
                && rbi(pcInt[pcint].current, PCINT17) == 0 
309
                && rbi(pcInt[pcint].mask, PCINT16) ) {
310
                && rbi(pcInt[pcint].mask, PCINT16) ) {
310
				
311
				
311
					if (rotary.timer == 0) {
312
					if (rotary.timer == 0) {
312
                        rotary.direction = 1;
313
                        rotary.direction = 1;
313
						rotary.timer = 5;
314
						rotary.timer = ROTARY_TIME;
314
					}
315
					}
315
						
316
 
316
        } else if (rbi(pcInt[pcint].current, PCINT16) == 0 
317
        } else if (rbi(pcInt[pcint].current, PCINT16) == 0 
317
                && rbi(pcInt[pcint].current, PCINT17) == 0 
318
                && rbi(pcInt[pcint].current, PCINT17) == 0 
318
                && rbi(pcInt[pcint].mask, PCINT17) ) {
319
                && rbi(pcInt[pcint].mask, PCINT17) ) {
319
					
320
					
320
					if (rotary.timer == 0) {
321
					if (rotary.timer == 0) {
321
                        rotary.direction = 2;
322
                        rotary.direction = 2;
322
						rotary.timer = 5;
323
						rotary.timer = ROTARY_TIME;
323
					}
324
					}
324
						
325
 
325
        }
326
        }
326
 
327
 
327
        // Clear the mask so we know we've delth with it
328
        // Clear the mask so we know we've delth with it
328
        pcInt[pcint].mask = 0;
329
        pcInt[pcint].mask = 0;
329
}
330
}