restore config
This commit is contained in:
parent
ce712477fe
commit
bc25723df0
22
avr/usbload/config.h
Normal file
22
avr/usbload/config.h
Normal 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
|
||||||
@ -100,6 +100,7 @@ usbMsgLen_t usbFunctionSetup(uchar data[8])
|
|||||||
* -------------------------------------------------------------------------
|
* -------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
} else if (rq->bRequest == USB_CRC_ADDR) {
|
} else if (rq->bRequest == USB_CRC_ADDR) {
|
||||||
|
req_state = REQ_CRC;
|
||||||
req_addr = rq->wValue.word;
|
req_addr = rq->wValue.word;
|
||||||
req_addr = req_addr << 16;
|
req_addr = req_addr << 16;
|
||||||
req_addr = req_addr | rq->wIndex.word;
|
req_addr = req_addr | rq->wIndex.word;
|
||||||
@ -120,6 +121,7 @@ usbMsgLen_t usbFunctionSetup(uchar data[8])
|
|||||||
tx_buffer[1] = (crc >> 8) & 0xff;
|
tx_buffer[1] = (crc >> 8) & 0xff;
|
||||||
sei();
|
sei();
|
||||||
ret_len = 2;
|
ret_len = 2;
|
||||||
|
req_state = REQ_IDLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
usbMsgPtr = data_buffer;
|
usbMsgPtr = data_buffer;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user