summaryrefslogtreecommitdiff
path: root/demos/host
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-07-03 11:36:08 +0700
committerhathach <[email protected]>2013-07-03 11:36:08 +0700
commit1667ef5041ad80d0f7b9dc76c286b8c59cedf180 (patch)
tree5199d458d727f607302cc9d895d3386862efbe17 /demos/host
parentb3f98bc15a47bea88806cbfdc899d46efe40d921 (diff)
replace tusbh_cdc_isr by tusbh_cdc_xfer_isr with extra parameter as
- pipe id - xferred_bytes host_class_driver_t add xferred_bytes parameter void (* const isr) (pipe_handle_t, tusb_event_t); --> void (* const isr) (pipe_handle_t, tusb_event_t, uint32_t); update hid_host & its tests
Diffstat (limited to 'demos/host')
-rw-r--r--demos/host/src/cdc_serial_app.c4
-rw-r--r--demos/host/src/main.c1
2 files changed, 4 insertions, 1 deletions
diff --git a/demos/host/src/cdc_serial_app.c b/demos/host/src/cdc_serial_app.c
index 5a5733c9c..cd58da74d 100644
--- a/demos/host/src/cdc_serial_app.c
+++ b/demos/host/src/cdc_serial_app.c
@@ -70,7 +70,7 @@ void tusbh_cdc_unmounted_isr(uint8_t dev_addr)
// application tear-down
}
-void tusbh_cdc_isr(uint8_t dev_addr, tusb_event_t event)
+void tusbh_cdc_xfer_isr(uint8_t dev_addr, tusb_event_t event, cdc_pipeid_t pipe_id, uint32_t xferred_bytes)
{
switch(event)
{
@@ -83,7 +83,9 @@ void tusbh_cdc_isr(uint8_t dev_addr, tusb_event_t event)
tusbh_cdc_receive(dev_addr, buffer_in, sizeof(buffer_in), true); // ignore & continue
break;
+ case TUSB_EVENT_XFER_STALLED:
default :
+ ASSERT(false, (void) 0); // error
break;
}
}
diff --git a/demos/host/src/main.c b/demos/host/src/main.c
index 51148d052..6c15c024b 100644
--- a/demos/host/src/main.c
+++ b/demos/host/src/main.c
@@ -52,6 +52,7 @@
#include "mouse_app.h"
#include "keyboard_app.h"
+#include "cdc_serial_app.h"
#if defined(__CODE_RED)
#include <cr_section_macros.h>