Subversion Repositories group.NITPanels

Rev

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

Rev 13 Rev 24
Line 24... Line 24...
24
  sbi(port, pin);
24
  sbi(port, pin);
25
  delay_ms(count);
25
  delay_ms(count);
26
  cbi(port, pin);
26
  cbi(port, pin);
27
}
27
}
28
 
28
 
29
void systemLed(uint8_t state) {
-
 
30
	if (state)
-
 
31
		sbi(PORTA, PA0);
-
 
32
	else
-
 
33
		cbi(PORTA, PA0);
-
 
34
}
-
 
35
 
-
 
36
char* tick_addr;
29
char* tick_addr;
37
 
30
 
38
void sysclockInit(void) {
31
void sysclockInit(void) {
-
 
32
 
-
 
33
#if defined (__AVR_ATtiny24__)
39
	TIMSK0 = (1<<TOIE0);             // Eable timer overflow for Timer0
34
	TIMSK0 = (1<<TOIE0);             // Eable timer overflow for Timer0
-
 
35
#elif defined (__AVR_ATtiny4313__)
-
 
36
	TIMSK = (1<<TOIE0);             // Eable timer overflow for Timer0
-
 
37
#endif
40
	TCCR0B = (1 << CS00) ;          // /1 prescaler
38
	TCCR0B = (1 << CS00) ;          // /1 prescaler
41
	TCNT0 = 0x00;                   // Set Timer0 to 0
39
	TCNT0 = 0x00;                   // Set Timer0 to 0
42
}
40
}
43
 
41
 
44
void swap_u8(uint8_t* a, uint8_t* b) {
42
void swap_u8(uint8_t* a, uint8_t* b) {