DSP2803x_Comp.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. //###########################################################################
  2. //
  3. // FILE: DSP2803x_Comp.h
  4. //
  5. // TITLE: DSP2803x Device Comparator Register Definitions
  6. //
  7. //###########################################################################
  8. // $TI Release: F2803x C/C++ Header Files and Peripheral Examples V130 $
  9. // $Release Date: May 8, 2015 $
  10. // $Copyright: Copyright (C) 2009-2015 Texas Instruments Incorporated -
  11. // http://www.ti.com/ ALL RIGHTS RESERVED $
  12. //###########################################################################
  13. #ifndef DSP2803x_COMP_H
  14. #define DSP2803x_COMP_H
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. //===========================================================================
  19. // Comparator Register Bit Definitions
  20. //
  21. struct COMPCTL_BITS { // bit description
  22. Uint16 COMPDACEN:1; // 0 Comparator/DAC Enable
  23. Uint16 COMPSOURCE:1; // 1 Source select for comparator inverting input
  24. Uint16 CMPINV:1; // 2 Invert select for Comparator
  25. Uint16 QUALSEL:5; // 7:03 Qualification Period for synchronized output of the comparator
  26. Uint16 SYNCSEL:1; // 8 Synchronization select for output of the comparator
  27. Uint16 rsvd1:7; // 15:09 reserved
  28. };
  29. union COMPCTL_REG {
  30. Uint16 all;
  31. struct COMPCTL_BITS bit;
  32. };
  33. struct COMPSTS_BITS { // bit description
  34. Uint16 COMPSTS:1; // 0 Logical latched value of the comparator
  35. Uint16 rsvd1:15; // 15:01 reserved
  36. };
  37. union COMPSTS_REG {
  38. Uint16 all;
  39. struct COMPSTS_BITS bit;
  40. };
  41. struct DACCTL_BITS { // bits description
  42. Uint16 DACSOURCE:1; // 0 DAC source control bits.
  43. Uint16 RAMPSOURCE:4; // 4:01 Ramp generator source control bits
  44. Uint16 rsvd1:9; // 13:05 reserved
  45. Uint16 FREE_SOFT:2; // 15:14 Debug Mode Bit
  46. };
  47. union DACCTL_REG {
  48. Uint16 all;
  49. struct DACCTL_BITS bit;
  50. };
  51. struct DACVAL_BITS { // bit description
  52. Uint16 DACVAL:10; // 9:00 DAC Value bit
  53. Uint16 rsvd1:6; // 15:10 reserved
  54. };
  55. union DACVAL_REG {
  56. Uint16 all;
  57. struct DACVAL_BITS bit;
  58. };
  59. //===========================================================================
  60. // Comparator Register Definitions
  61. //
  62. struct COMP_REGS {
  63. union COMPCTL_REG COMPCTL;
  64. Uint16 rsvd1;
  65. union COMPSTS_REG COMPSTS;
  66. Uint16 rsvd2;
  67. union DACCTL_REG DACCTL;
  68. Uint16 rsvd3;
  69. union DACVAL_REG DACVAL;
  70. Uint16 rsvd4;
  71. Uint16 RAMPMAXREF_ACTIVE;
  72. Uint16 rsvd5;
  73. Uint16 RAMPMAXREF_SHDW;
  74. Uint16 rsvd6;
  75. Uint16 RAMPDECVAL_ACTIVE;
  76. Uint16 rsvd7;
  77. Uint16 RAMPDECVAL_SHDW;
  78. Uint16 rsvd8;
  79. Uint16 RAMPSTS;
  80. Uint16 rsvd9[3];
  81. };
  82. //===========================================================================
  83. // Comparator External References and Function Declarations
  84. //
  85. extern volatile struct COMP_REGS Comp1Regs;
  86. extern volatile struct COMP_REGS Comp2Regs;
  87. extern volatile struct COMP_REGS Comp3Regs;
  88. #ifdef __cplusplus
  89. }
  90. #endif /* extern "C" */
  91. #endif // end of DSP2803x_COMP_H definition
  92. //===========================================================================
  93. // End of file
  94. //===========================================================================