usb_cdc_acm.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * (C) Copyright 2006
  3. * Bryan O'Donoghue, deckard@codehermit.ie, CodeHermit
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program; if not, write to the Free Software
  17. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18. *
  19. */
  20. /* ACM Control Requests */
  21. #define ACM_SEND_ENCAPSULATED_COMMAND 0x00
  22. #define ACM_GET_ENCAPSULATED_RESPONSE 0x01
  23. #define ACM_SET_COMM_FEATURE 0x02
  24. #define ACM_GET_COMM_FEATRUE 0x03
  25. #define ACM_CLEAR_COMM_FEATURE 0x04
  26. #define ACM_SET_LINE_ENCODING 0x20
  27. #define ACM_GET_LINE_ENCODING 0x21
  28. #define ACM_SET_CONTROL_LINE_STATE 0x22
  29. #define ACM_SEND_BREAK 0x23
  30. /* ACM Notification Codes */
  31. #define ACM_NETWORK_CONNECTION 0x00
  32. #define ACM_RESPONSE_AVAILABLE 0x01
  33. #define ACM_SERIAL_STATE 0x20
  34. /* Format of response expected by a ACM_GET_LINE_ENCODING request */
  35. struct rs232_emu{
  36. unsigned long dter;
  37. unsigned char stop_bits;
  38. unsigned char parity;
  39. unsigned char data_bits;
  40. }__attribute__((packed));