Extend CDC/ACM driver so that can be connected/disconnected under software control; Add new NSH commands sercon and serdis that will connect and disconnect the CDC/ACM serial device

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4436 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo
2012-02-28 18:14:55 +00:00
parent 2ac7d84029
commit 56bcc7b105
16 changed files with 516 additions and 52 deletions
+8
View File
@@ -222,6 +222,14 @@
#define CDCACM_EPINBULK_ADDR (USB_DIR_IN|CONFIG_CDCACM_EPBULKIN)
#define CDCACM_EPINBULK_ATTR (USB_EP_ATTR_XFER_BULK)
/* Device driver definitions ************************************************/
/* A CDC/ACM device is specific by a minor number in the range of 0-255.
* This maps to a character device at /dev/ttyACMx, x=0..255.
*/
#define CDCACM_DEVNAME_FORMAT "/dev/ttyACM%d"
#define CDCACM_DEVNAME_SIZE 16
/* Misc Macros **************************************************************/
/* MIN/MAX macros */