testmode.h 855 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * testmode.h
  3. *
  4. * Greaseweazle test-mode command protocol. Subject to change!
  5. *
  6. * Written & released by Keir Fraser <keir.xen@gmail.com>
  7. *
  8. * This is free and unencumbered software released into the public domain.
  9. * See the file COPYING for more details, or visit <http://unlicense.org>.
  10. */
  11. #define CMD_option_bytes 0
  12. #define CMD_pins 1
  13. #define CMD_led 2
  14. #define CMD_test_headers 3
  15. /* CMD_test_headers return code in rsp.u.x[0] */
  16. #define TESTHEADER_success 100
  17. struct cmd {
  18. uint32_t cmd;
  19. union {
  20. uint8_t pins[64/8];
  21. uint32_t x[28/4];
  22. } u;
  23. };
  24. struct rsp {
  25. union {
  26. uint8_t opt[32];
  27. uint8_t pins[64/8];
  28. uint32_t x[32/4];
  29. } u;
  30. };
  31. /*
  32. * Local variables:
  33. * mode: C
  34. * c-file-style: "Linux"
  35. * c-basic-offset: 4
  36. * tab-width: 4
  37. * indent-tabs-mode: nil
  38. * End:
  39. */