Project

General

Profile

Revision 849

tried to make more compatible with other libraries (failed)

View differences:

branches/autonomous_recharging/code/projects/libbayboard/orb.c
59 59
	
60 60
	/*blue is here. it goes on timer 0*/
61 61
	/*timer counter control registers for timer 0*/
62
	TCCR0A = _BV(COM0B1)|_BV(COM0B0)|_BV(WGM01)|_BV(WGM00);
62
	TCCR0A |= _BV(COM0B1)|_BV(COM0B0)|_BV(WGM01)|_BV(WGM00);
63 63
	
64
	TCCR0B = _BV(CS00);
64
	TCCR0B |= _BV(CS00);
65 65
	OCR0B = 0;
66 66
   
67 67
	/*green is here. it goes on timer 2*/
68
	TCCR2A = _BV(COM2B1)|_BV(COM2B0)|_BV(WGM21)|_BV(WGM20);	
69
	TCCR2B = _BV(CS20);
68
	TCCR2A |= _BV(COM2B1)|_BV(COM2B0)|_BV(WGM21)|_BV(WGM20);	
69
	TCCR2B |= _BV(CS20);
70 70
	OCR2B = 0;
71 71
	
72 72
	
73 73
	/*red is here. it goes on timer 1 which counts to the value in ICR1 instead of 8 bits*/
74
	TCCR1A = _BV(COM1B1)|_BV(COM1B0)|_BV(WGM11);	
75
	TCCR1B = _BV(WGM13)|_BV(WGM12)|_BV(CS10);
74
	TCCR1A |= _BV(COM1B1)|_BV(COM1B0)|_BV(WGM11);	
75
	TCCR1B |= _BV(WGM13)|_BV(WGM12)|_BV(CS10);
76 76
	ICR1 = 0x9C40;
77 77
	OCR1B = 0;
78 78
   

Also available in: Unified diff