kobil_sct.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #define SUSBCRequest_SetBaudRateParityAndStopBits 1
  3. #define SUSBCR_SBR_MASK 0xFF00
  4. #define SUSBCR_SBR_1200 0x0100
  5. #define SUSBCR_SBR_9600 0x0200
  6. #define SUSBCR_SBR_19200 0x0400
  7. #define SUSBCR_SBR_28800 0x0800
  8. #define SUSBCR_SBR_38400 0x1000
  9. #define SUSBCR_SBR_57600 0x2000
  10. #define SUSBCR_SBR_115200 0x4000
  11. #define SUSBCR_SPASB_MASK 0x0070
  12. #define SUSBCR_SPASB_NoParity 0x0010
  13. #define SUSBCR_SPASB_OddParity 0x0020
  14. #define SUSBCR_SPASB_EvenParity 0x0040
  15. #define SUSBCR_SPASB_STPMASK 0x0003
  16. #define SUSBCR_SPASB_1StopBit 0x0001
  17. #define SUSBCR_SPASB_2StopBits 0x0002
  18. #define SUSBCRequest_SetStatusLinesOrQueues 2
  19. #define SUSBCR_SSL_SETRTS 0x0001
  20. #define SUSBCR_SSL_CLRRTS 0x0002
  21. #define SUSBCR_SSL_SETDTR 0x0004
  22. #define SUSBCR_SSL_CLRDTR 0x0010
  23. /* Kill the pending/current writes to the comm port. */
  24. #define SUSBCR_SSL_PURGE_TXABORT 0x0100
  25. /* Kill the pending/current reads to the comm port. */
  26. #define SUSBCR_SSL_PURGE_RXABORT 0x0200
  27. /* Kill the transmit queue if there. */
  28. #define SUSBCR_SSL_PURGE_TXCLEAR 0x0400
  29. /* Kill the typeahead buffer if there. */
  30. #define SUSBCR_SSL_PURGE_RXCLEAR 0x0800
  31. #define SUSBCRequest_GetStatusLineState 4
  32. /* Any Character received */
  33. #define SUSBCR_GSL_RXCHAR 0x0001
  34. /* Transmitt Queue Empty */
  35. #define SUSBCR_GSL_TXEMPTY 0x0004
  36. /* CTS changed state */
  37. #define SUSBCR_GSL_CTS 0x0008
  38. /* DSR changed state */
  39. #define SUSBCR_GSL_DSR 0x0010
  40. /* RLSD changed state */
  41. #define SUSBCR_GSL_RLSD 0x0020
  42. /* BREAK received */
  43. #define SUSBCR_GSL_BREAK 0x0040
  44. /* Line status error occurred */
  45. #define SUSBCR_GSL_ERR 0x0080
  46. /* Ring signal detected */
  47. #define SUSBCR_GSL_RING 0x0100
  48. #define SUSBCRequest_Misc 8
  49. /* use a predefined reset sequence */
  50. #define SUSBCR_MSC_ResetReader 0x0001
  51. /* use a predefined sequence to reset the internal queues */
  52. #define SUSBCR_MSC_ResetAllQueues 0x0002
  53. #define SUSBCRequest_GetMisc 0x10
  54. /*
  55. * get the firmware version from device, coded like this 0xHHLLBBPP with
  56. * HH = Firmware Version High Byte
  57. * LL = Firmware Version Low Byte
  58. * BB = Build Number
  59. * PP = Further Attributes
  60. */
  61. #define SUSBCR_MSC_GetFWVersion 0x0001
  62. /*
  63. * get the hardware version from device coded like this 0xHHLLPPRR with
  64. * HH = Software Version High Byte
  65. * LL = Software Version Low Byte
  66. * PP = Further Attributes
  67. * RR = Reserved for the hardware ID
  68. */
  69. #define SUSBCR_MSC_GetHWVersion 0x0002