Subversion Repositories group.electronics

Rev

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

Rev 39 Rev 40
Line 8... Line 8...
8
#include <usbdrv.h>
8
#include <usbdrv.h>
9
 
9
 
10
#include <stdlib.h>
10
#include <stdlib.h>
11
#include <string.h>
11
#include <string.h>
12
 
12
 
-
 
13
#include "wire.h"
13
#include "config.h"
14
#include "config.h"
14
#include "hiddesc.h"
15
#include "hiddesc.h"
15
 
16
 
16
#define ROTS_ATTACHED	1
17
#define ROTS_ATTACHED	1
17
#define STAT		0
18
#define STAT		0
Line 172... Line 173...
172
  // Setup timer0 - Enable overflow, 8 times prescaler
173
  // Setup timer0 - Enable overflow, 8 times prescaler
173
	TIMSK0 = (1<<TOIE0);			// Eable timer overflow for Timer0
174
	TIMSK0 = (1<<TOIE0);			// Eable timer overflow for Timer0
174
	TCNT0 = 0x00;				// Set Timer0 to 0
175
	TCNT0 = 0x00;				// Set Timer0 to 0
175
	TCCR0B = (1<< CS01) ;			// /8 prescaler
176
	TCCR0B = (1<< CS01) ;			// /8 prescaler
176
 
177
 
-
 
178
	i2c_master();
-
 
179
	i2c_beginTransmission(0x27);
-
 
180
	i2c_writeByte(0x01);
-
 
181
	i2c_endTransmission(1);
-
 
182
 
-
 
183
 
177
  usbDeviceDisconnect();  /* enforce re-enumeration, do this while interrupts are disabled! */
184
  usbDeviceDisconnect();  /* enforce re-enumeration, do this while interrupts are disabled! */
178
  _delay_ms(500);
185
  _delay_ms(500);
179
  usbDeviceConnect();
186
  usbDeviceConnect();
180
 
187
 
181
  wdt_enable(WDTO_1S);
188
  wdt_enable(WDTO_1S);