tapsm.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. #ifndef XSVFEXEC_TAPSM_H_
  2. #define XSVFEXEC_TAPSM_H_
  3. /*
  4. * Copyright (C) 2004-2007 by egnite Software GmbH
  5. * Copyright (C) 2008 by egnite GmbH
  6. *
  7. * All rights reserved.
  8. *
  9. * Redistribution and use in source and binary forms, with or without
  10. * modification, are permitted provided that the following conditions
  11. * are met:
  12. *
  13. * 1. Redistributions of source code must retain the above copyright
  14. * notice, this list of conditions and the following disclaimer.
  15. * 2. Redistributions in binary form must reproduce the above copyright
  16. * notice, this list of conditions and the following disclaimer in the
  17. * documentation and/or other materials provided with the distribution.
  18. * 3. Neither the name of the copyright holders nor the names of
  19. * contributors may be used to endorse or promote products derived
  20. * from this software without specific prior written permission.
  21. *
  22. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  23. * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  24. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  25. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  26. * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  27. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  28. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  29. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  30. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  31. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  32. * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  33. * SUCH DAMAGE.
  34. *
  35. * For additional information see http://www.ethernut.de/
  36. * and Xilinx Application Note XAPP058.
  37. */
  38. /*
  39. * $Log$
  40. * Revision 1.1 2008/10/20 13:10:05 haraldkipp
  41. * Checked in.
  42. *
  43. */
  44. #include <sys/types.h>
  45. /*!
  46. * \file tapsm.h
  47. * \brief TAP state header file.
  48. */
  49. /*!
  50. * \addtogroup xgTAP
  51. */
  52. /*@{*/
  53. /*! TAP state. */
  54. #define TEST_LOGIC_RESET 0x00
  55. /*! TAP state. */
  56. #define RUN_TEST_IDLE 0x01
  57. /*! TAP state. */
  58. #define SELECT_DR_SCAN 0x02
  59. /*! TAP state. */
  60. #define CAPTURE_DR 0x03
  61. /*! TAP state. */
  62. #define SHIFT_DR 0x04
  63. /*! TAP state. */
  64. #define EXIT1_DR 0x05
  65. /*! TAP state. */
  66. #define PAUSE_DR 0x06
  67. /*! TAP state. */
  68. #define EXIT2_DR 0x07
  69. /*! TAP state. */
  70. #define UPDATE_DR 0x08
  71. /*! TAP state. */
  72. #define SELECT_IR_SCAN 0x09
  73. /*! TAP state. */
  74. #define CAPTURE_IR 0x0A
  75. /*! TAP state. */
  76. #define SHIFT_IR 0x0B
  77. /*! TAP state. */
  78. #define EXIT1_IR 0x0C
  79. /*! TAP state. */
  80. #define PAUSE_IR 0x0D
  81. /*! TAP state. */
  82. #define EXIT2_IR 0x0E
  83. /*! TAP state. */
  84. #define UPDATE_IR 0x0F
  85. /*! Unknown TAP state, indicates an error. */
  86. #define UNKNOWN_STATE 0x10
  87. extern void TapStateInit(void);
  88. extern int TapStateChange(uint8_t state);
  89. extern void TapStateInc(void);
  90. /*@}*/
  91. #endif