master
Dario Ernst 15 years ago
parent edb3b0c36a
commit af991bff0d

Binary file not shown.

Binary file not shown.

@ -48,27 +48,27 @@ void softinit() {
usbMsgLen_t usbFunctionSetup(uchar data[8]) {
usbRequest_t *rq = (void *)data;
static uchar dataBuffer[4]; /* buffer must stay valid when usbFunctionSetup returns */
static uchar dataBuffer[4];
if(rq->bRequest == 1){ /* echo -- used for reliability tests */
if(rq->bRequest == 1){
dataBuffer[0] = (thermoData [0] & 0xff00)>>8;
dataBuffer[1] = thermoData [0] & 0x00ff;
dataBuffer[2] = (thermoData [1] & 0xff00)>>8;
dataBuffer[3] = thermoData [1] & 0x00ff;
usbMsgPtr = dataBuffer; /* tell the driver which data to return */
usbMsgPtr = dataBuffer;
return 4;
}
if(rq->bRequest == 2){ /* echo -- used for reliability tests */
if(rq->bRequest == 2){
dataBuffer[0] = (thermoData [2] & 0xff00)>>8;
dataBuffer[1] = thermoData [2] & 0x00ff;
dataBuffer[2] = (thermoData [3] & 0xff00)>>8;
dataBuffer[3] = thermoData [3] & 0x00ff;
usbMsgPtr = dataBuffer; /* tell the driver which data to return */
usbMsgPtr = dataBuffer;
return 4;
}
return 0; /* default for not implemented requests: return no data back to host */
return 0;
}
void updateDisplay() {

Loading…
Cancel
Save