selftest.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. ** File: selftest.h
  3. **
  4. ** Author: David Dix
  5. **
  6. ** Created: 15th March 1993
  7. **
  8. ** Last modified: 94/06/14
  9. **
  10. *
  11. * (C) 1990 - 2000 Specialix International Ltd., Byfleet, Surrey, UK.
  12. *
  13. * This program is free software; you can redistribute it and/or modify
  14. * it under the terms of the GNU General Public License as published by
  15. * the Free Software Foundation; either version 2 of the License, or
  16. * (at your option) any later version.
  17. *
  18. * This program is distributed in the hope that it will be useful,
  19. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  20. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. * GNU General Public License for more details.
  22. *
  23. * You should have received a copy of the GNU General Public License
  24. * along with this program; if not, write to the Free Software
  25. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  26. */
  27. #ifndef _selftests_h_
  28. #define _selftests_h_
  29. /*
  30. ** Selftest identifier...
  31. */
  32. #define SELFTEST_MAGIC 0x5a5a
  33. /*
  34. ** This is the structure of the packet that is sent back after each
  35. ** selftest on a booting RTA.
  36. */
  37. typedef struct {
  38. short magic; /* Identifies packet type */
  39. int test; /* Test number, see below */
  40. unsigned int result; /* Result value */
  41. unsigned int dataIn;
  42. unsigned int dataOut;
  43. }selftestStruct;
  44. /*
  45. ** The different tests are identified by the following data values.
  46. */
  47. enum test {
  48. TESTS_COMPLETE = 0x00,
  49. MEMTEST_ADDR = 0x01,
  50. MEMTEST_BIT = 0x02,
  51. MEMTEST_FILL = 0x03,
  52. MEMTEST_DATABUS = 0x04,
  53. MEMTEST_ADDRBUS = 0x05,
  54. CD1400_INIT = 0x10,
  55. CD1400_LOOP = 0x11,
  56. CD1400_INTERRUPT = 0x12
  57. };
  58. enum result {
  59. E_PORT = 0x10,
  60. E_TX = 0x11,
  61. E_RX = 0x12,
  62. E_EXCEPT = 0x13,
  63. E_COMPARE = 0x14,
  64. E_MODEM = 0x15,
  65. E_TIMEOUT = 0x16,
  66. E_INTERRUPT = 0x17
  67. };
  68. #endif /* _selftests_h_ */