summaryrefslogtreecommitdiff
path: root/tinyusb/class/cdc_host.c
diff options
context:
space:
mode:
authorhathach <[email protected]>2013-07-01 11:29:23 +0700
committerhathach <[email protected]>2013-07-01 11:29:23 +0700
commite1883fcd263456ffc7ef318e4f549364fff3945e (patch)
tree83e25d86fd87136e2660c8f86475bde4e5f3462d /tinyusb/class/cdc_host.c
parente94ce81b045069f12e29ea355c2248ef6254ca0d (diff)
add acm_capability saving to host data & its test
Diffstat (limited to 'tinyusb/class/cdc_host.c')
-rw-r--r--tinyusb/class/cdc_host.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tinyusb/class/cdc_host.c b/tinyusb/class/cdc_host.c
index f4d82fc6f..81d992c21 100644
--- a/tinyusb/class/cdc_host.c
+++ b/tinyusb/class/cdc_host.c
@@ -89,6 +89,11 @@ tusb_error_t cdch_open_subtask(uint8_t dev_addr, tusb_descriptor_interface_t con
while( TUSB_DESC_TYPE_INTERFACE_CLASS_SPECIFIC == p_desc[DESCRIPTOR_OFFSET_TYPE] )
{ // Communication Functional Descriptors
+ if ( CDC_FUNC_DESC_ABSTRACT_CONTROL_MANAGEMENT == functional_desc_typeof(p_desc) )
+ { // save ACM bmCapabilities
+ p_cdc->acm_capability = ((tusb_cdc_func_abstract_control_management_t const *) p_desc)->bmCapabilities;
+ }
+
(*p_length) += p_desc[DESCRIPTOR_OFFSET_LENGTH];
p_desc = descriptor_next(p_desc);
}