restore config

This commit is contained in:
david 2009-06-24 14:44:50 +02:00
parent ce712477fe
commit bc25723df0
2 changed files with 24 additions and 0 deletions

22
avr/usbload/config.h Normal file
View File

@ -0,0 +1,22 @@
#ifndef __config_h__
#define __config_h__
#define DEBUG_USB 1
#define DEBUG_USB_RAW 1
#define DEBUG_SRAM 1
#define DEBUG_SREG 1
#define DEBUG 1
#define REQ_IDLE 0
#define REQ_UPLOAD 1
#define REQ_CRC 2
#define USB_MAX_TRANS 0xff
#define USB_CRC_CHECK 1
#define BUFFER_SIZE 0xff
#endif

View File

@ -100,6 +100,7 @@ usbMsgLen_t usbFunctionSetup(uchar data[8])
* -------------------------------------------------------------------------
*/
} else if (rq->bRequest == USB_CRC_ADDR) {
req_state = REQ_CRC;
req_addr = rq->wValue.word;
req_addr = req_addr << 16;
req_addr = req_addr | rq->wIndex.word;
@ -120,6 +121,7 @@ usbMsgLen_t usbFunctionSetup(uchar data[8])
tx_buffer[1] = (crc >> 8) & 0xff;
sei();
ret_len = 2;
req_state = REQ_IDLE;
}
usbMsgPtr = data_buffer;