diff options
author | Christian Pointner <equinox@spreadspace.org> | 2013-02-05 00:59:36 +0000 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2013-02-05 00:59:36 +0000 |
commit | af8bffe839ab8659b01064744f3a072df2fa2bb2 (patch) | |
tree | 61a5d273d2e77199db08d8efef93585c38954edc /usb-i2c-sl018 | |
parent | TagStar Port changed in new hardware revision (diff) |
improved handling of not open acm device
git-svn-id: https://svn.spreadspace.org/avr/trunk@115 aa12f405-d877-488e-9caf-2d797e2a1cc7
Diffstat (limited to 'usb-i2c-sl018')
-rw-r--r-- | usb-i2c-sl018/tuer-rfid.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/usb-i2c-sl018/tuer-rfid.c b/usb-i2c-sl018/tuer-rfid.c index 76fb877..91906bf 100644 --- a/usb-i2c-sl018/tuer-rfid.c +++ b/usb-i2c-sl018/tuer-rfid.c @@ -173,7 +173,6 @@ void EVENT_USB_Device_ConfigurationChanged(void) {
CDC_Device_ConfigureEndpoints(&VirtualSerial_CDC_Interface);
CDC_Device_CreateStream(&VirtualSerial_CDC_Interface,&usb_stream);
- stdio = &usb_stream;
}
void EVENT_USB_Device_ControlRequest(void)
@@ -181,6 +180,14 @@ void EVENT_USB_Device_ControlRequest(void) CDC_Device_ProcessControlRequest(&VirtualSerial_CDC_Interface);
}
+void EVENT_CDC_Device_ControLineStateChanged(USB_ClassInfo_CDC_Device_t* const CDCInterfaceInfo)
+{
+ if(CDCInterfaceInfo->State.ControlLineStates.HostToDevice & CDC_CONTROL_LINE_OUT_DTR)
+ stdio = &usb_stream;
+ else
+ stdio = &serial_stream;
+}
+
void EVENT_USB_Device_Disconnect(void)
{
stdio = &serial_stream;
|