Subversion Repositories group.electronics

Rev

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

Rev 89 Rev 90
Line 74... Line 74...
74
{
74
{
75
    usbRequest_t    *rq = (void *)data;
75
    usbRequest_t    *rq = (void *)data;
76
 
76
 
77
    //if((rq->bmRequestType & USBRQ_TYPE_MASK) == USBRQ_TYPE_CLASS){ 
77
    //if((rq->bmRequestType & USBRQ_TYPE_MASK) == USBRQ_TYPE_CLASS){ 
78
 
78
 
79
	sbi (PORTD, 4);	
-
 
80
		
-
 
81
        switch (rq->bRequest ) {
79
        switch (rq->bRequest ) {
82
		case USBRQ_HID_GET_REPORT:
80
		case USBRQ_HID_GET_REPORT:
83
			return sizeof(reportBuffer);
81
			return sizeof(reportBuffer);
84
		case USBRQ_HID_GET_IDLE:
82
		case USBRQ_HID_GET_IDLE:
85
			usbMsgPtr = &idleRate;
83
			usbMsgPtr = &idleRate;
Line 193... Line 191...
193
    for(;;){
191
    for(;;){
194
        wdt_reset();
192
        wdt_reset();
195
        usbPoll();
193
        usbPoll();
196
 
194
 
197
	uint8_t pressed = getKey();
195
	uint8_t pressed = getKey();
198
	doButtons(pressed);	
196
	//doButtons(pressed);	
-
 
197
	setLeds(currleds);
199
 
198
 
200
        if(usbInterruptIsReady()){ 
199
        if(usbInterruptIsReady()){ 
201
                reportBuffer.buttons = pressed;
200
                reportBuffer.buttons = pressed;
202
		usbSendHidReport(&reportBuffer, sizeof(reportBuffer));
201
		usbSendHidReport(&reportBuffer, sizeof(reportBuffer));
203
        }
202
        }