Designer Reference Manual
USB08 Evaluation Board
106
Source Code Files
MOTOROLA
Source Code Files
// SET_CONFIGURATION Standard Device Request Handler
// called by handleSETUP();
//
void setConfiguration() {
if( SetupBuffer.wIndex.hi ||
SetupBuffer.wIndex.lo ||
SetupBuffer.wLength.hi ||
SetupBuffer.wLength.lo ||
SetupBuffer.wValue.hi ||
(SetupBuffer.wValue.lo > 1) ||
(USB_State == US_DEFAULT)) {
forceSTALL();
}
else {
if(SetupBuffer.wValue.lo > 0) {
// no need to remember the Configuration Value
// since we support only one Configuration anyway
USB_State = US_CONFIGURED;
// Activate Interrupt Endpoints, reset STALL and DATA-Toggle
UCR1 = B 0;
// EP1 Tx Enable, Data Size is 0
UCR2 = BM_RX2E;
// EP2 Rx Enable
}
else {
// Zero means: go back to Adressed State
USB_State = US_ADDRESSED;
UCR1 = 0;
// deactivate EP1
UCR2 = 0;
// deactivate EP2
}
// prepare to send empty DATA1 at next IN Transaction
UCR0 = BM B 0;
}
}
//----------------------------------------------------------------------------
Содержание MC68HC908JB8
Страница 2: ...blank ...
Страница 6: ...Designer Reference Manual USB08 Evaluation Board 6 List of Sections MOTOROLA List of Sections ...
Страница 16: ...Designer Reference Manual USB08 Evaluation Board 16 List of Tables MOTOROLA List of Tables ...
Страница 42: ...Designer Reference Manual USB08 Evaluation Board 42 Hardware Description MOTOROLA Hardware Description ...
Страница 88: ...Designer Reference Manual USB08 Evaluation Board 88 USB08 Descriptors MOTOROLA USB08 Descriptors ...
Страница 243: ...blank ...