version 0.5.0_alpha
git-svn-id: svn://db.shs.com.ru/pip@8 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -348,41 +348,41 @@ void PIUSB::flush() {
|
||||
|
||||
PICout operator<<(PICout s, const PIUSB::Endpoint & v) {
|
||||
s.setControl(0, true);
|
||||
s << NewLine << "{" << NewLine;
|
||||
s << PICoutManipulators::NewLine << "{" << PICoutManipulators::NewLine;
|
||||
if (v.isNull())
|
||||
s << " " << "Null Endpoint";
|
||||
else {
|
||||
s << " " << "Address: " << v.address << NewLine;
|
||||
s << " " << "Attributes: " << v.attributes << NewLine;
|
||||
s << " " << "Direction: " << (v.direction == PIUSB::Endpoint::Write ? "Write" : "Read") << NewLine;
|
||||
s << " " << "Address: " << v.address << PICoutManipulators::NewLine;
|
||||
s << " " << "Attributes: " << v.attributes << PICoutManipulators::NewLine;
|
||||
s << " " << "Direction: " << (v.direction == PIUSB::Endpoint::Write ? "Write" : "Read") << PICoutManipulators::NewLine;
|
||||
s << " " << "Transfer Type: ";
|
||||
switch (v.transfer_type) {
|
||||
case PIUSB::Endpoint::Control: s << "Control" << NewLine; break;
|
||||
case PIUSB::Endpoint::Bulk: s << "Bulk" << NewLine; break;
|
||||
case PIUSB::Endpoint::Interrupt: s << "Interrupt" << NewLine; break;
|
||||
case PIUSB::Endpoint::Isochronous: s << "Isochronous" << NewLine; break;
|
||||
case PIUSB::Endpoint::Control: s << "Control" << PICoutManipulators::NewLine; break;
|
||||
case PIUSB::Endpoint::Bulk: s << "Bulk" << PICoutManipulators::NewLine; break;
|
||||
case PIUSB::Endpoint::Interrupt: s << "Interrupt" << PICoutManipulators::NewLine; break;
|
||||
case PIUSB::Endpoint::Isochronous: s << "Isochronous" << PICoutManipulators::NewLine; break;
|
||||
default: break;
|
||||
}
|
||||
if (v.transfer_type == PIUSB::Endpoint::Isochronous) {
|
||||
s << " " << "Synchronisation Type: ";
|
||||
switch (v.synchronisation_type) {
|
||||
case PIUSB::Endpoint::NoSynchonisation: s << "No Synchonisation" << NewLine; break;
|
||||
case PIUSB::Endpoint::Asynchronous: s << "Asynchronous" << NewLine; break;
|
||||
case PIUSB::Endpoint::Adaptive: s << "Adaptive" << NewLine; break;
|
||||
case PIUSB::Endpoint::Synchronous: s << "Synchronous" << NewLine; break;
|
||||
case PIUSB::Endpoint::NoSynchonisation: s << "No Synchonisation" << PICoutManipulators::NewLine; break;
|
||||
case PIUSB::Endpoint::Asynchronous: s << "Asynchronous" << PICoutManipulators::NewLine; break;
|
||||
case PIUSB::Endpoint::Adaptive: s << "Adaptive" << PICoutManipulators::NewLine; break;
|
||||
case PIUSB::Endpoint::Synchronous: s << "Synchronous" << PICoutManipulators::NewLine; break;
|
||||
default: break;
|
||||
}
|
||||
s << " " << "Usage Type: ";
|
||||
switch (v.usage_type) {
|
||||
case PIUSB::Endpoint::DataEndpoint: s << "Data Endpoint" << NewLine; break;
|
||||
case PIUSB::Endpoint::FeedbackEndpoint: s << "Feedback Endpoint" << NewLine; break;
|
||||
case PIUSB::Endpoint::ExplicitFeedbackDataEndpoint: s << "Explicit Feedback Data Endpoint" << NewLine; break;
|
||||
case PIUSB::Endpoint::DataEndpoint: s << "Data Endpoint" << PICoutManipulators::NewLine; break;
|
||||
case PIUSB::Endpoint::FeedbackEndpoint: s << "Feedback Endpoint" << PICoutManipulators::NewLine; break;
|
||||
case PIUSB::Endpoint::ExplicitFeedbackDataEndpoint: s << "Explicit Feedback Data Endpoint" << PICoutManipulators::NewLine; break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
s << " " << "Max Packet Size: " << v.max_packet_size << NewLine;
|
||||
s << " " << "Max Packet Size: " << v.max_packet_size << PICoutManipulators::NewLine;
|
||||
}
|
||||
s << "}" << NewLine;
|
||||
s << "}" << PICoutManipulators::NewLine;
|
||||
s.restoreControl();
|
||||
return s;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user