diff --git a/ChangeLog b/ChangeLog index 6b9b48b4fd..ef16dd1b53 100755 --- a/ChangeLog +++ b/ChangeLog @@ -11579,4 +11579,6 @@ processed when the poll from the correct device is received (2016-03-20). * sched/wqueue/kwork_signal.c: Fix logic to find an IDLE worker thread; the test for busy was backward. From Linfei Chen (2016-03-22). - + * include/sys/boardctl.h, configs/boardctl.c, and many configurations: Add + boardctl() support that will permit applications to control USB devices + (2016-03-25). diff --git a/TODO b/TODO index d07aeb9d67..e3269cf167 100644 --- a/TODO +++ b/TODO @@ -462,27 +462,22 @@ o Kernel/Protected Build Title: apps/system PARTITIONING Description: Several of the USB device helper applications in apps/system violate OS/application partitioning and will fail on a kernel - or protected build. These include directories: - - - apps/system/cdcacm - - apps/system/composite - - apps/system/usbmsc + or protected build. Many of these have been fixed by adding + the BOARDIOC_USBDEV_CONTROL boarctl command. But there are + still issues. These functions call directly into operating system functions like: - - usbmsc_archinitialize - - composite_archinitialize - - cdcacm_initialize - - cdcacm_uninitialize - - usbmsc_initialize - - usbmsc_uninitialize - - composite_initialize - - composite-Uninitialize + - usbdev_serialinitialize - Called in apps/examples/usbserial, + apps/examples/usbterm + - cdcacm_classobject - Called from apps/system/composite. + - usbmsc_configure - Called fromo apps/system/usbmsc and + apps/system/composite + - usbmsc_bindlun - Called fromo apps/system/usbmsc and + apps/system/composite + - usbmsc_exportluns - Called fromo apps/system/usbmsc. - Since the corrsponding device drivers may not be present, these - cannot be replaced with IOCTLs. Perhaps they should be support - with new boardctl commands? Status: Open Priority: Medium/High -- the kernel build configuration is not fully fielded yet. diff --git a/configs b/configs index bf03801065..4f47454f05 160000 --- a/configs +++ b/configs @@ -1 +1 @@ -Subproject commit bf0380106515b5c3e7793e0d1cbf37604016e499 +Subproject commit 4f47454f0557095bcd2e29ac1923bbf588689c33 diff --git a/include/nuttx/board.h b/include/nuttx/board.h index fb3605ab5e..0d742257e3 100644 --- a/include/nuttx/board.h +++ b/include/nuttx/board.h @@ -235,11 +235,13 @@ int board_uniqueid(FAR uint8_t *uniqueid); ****************************************************************************/ #ifdef CONFIG_BOARDCTL_USBDEVCTRL -#if defined(CONFIG_CDCACM) && !defined(CONFIG_CDCACM_COMPOSITE) +#ifdef CONFIG_CDCACM #endif -#if defined(CONFIG_USBMSC) && !defined(CONFIG_USBMSC_COMPOSITE) + +#ifdef CONFIG_USBMSC int board_usbmsc_initialize(int port); #endif + #ifdef CONFIG_USBDEV_COMPOSITE int board_composite_initialize(int port); #endif diff --git a/include/sys/boardctl.h b/include/sys/boardctl.h index 2be03e4bc3..f7f37bc07a 100644 --- a/include/sys/boardctl.h +++ b/include/sys/boardctl.h @@ -225,7 +225,7 @@ struct boardioc_symtab_s enum boardioc_usbdev_identifier_e { BOARDIOC_USBDEV_NONE = 0 /* Not valid */ -#if defined(CONFIG_CDCACM) && !defined(CONFIG_CDCACM_COMPOSITE) +#ifdef CONFIG_CDCACM , BOARDIOC_USBDEV_CDCACM /* CDC/ACM */ #endif #ifdef CONFIG_USBMSC