kobil_sct.h 2.4 KB

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