pcibx.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. Catalyst PCIBX32 PCI Extender control utility
  3. Copyright (c) 2006,2007 Michael Buesch <mb@bu3sch.de>
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; see the file COPYING. If not, write to
  14. the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
  15. Boston, MA 02110-1301, USA.
  16. */
  17. #ifndef PCIBX_H_
  18. #define PCIBX_H_
  19. #include "utils.h"
  20. #define VERSION pcibx_stringify(VERSION_)
  21. enum command_id {
  22. CMD_GLOB,
  23. CMD_UUT,
  24. CMD_PRINTBOARDID,
  25. CMD_PRINTFIRMREV,
  26. CMD_PRINTSTATUS,
  27. CMD_CLEARBITSTAT,
  28. CMD_AUX5,
  29. CMD_AUX33,
  30. CMD_MEASUREFREQ,
  31. CMD_MEASUREV25REF,
  32. CMD_MEASUREV12UUT,
  33. CMD_MEASUREV5UUT,
  34. CMD_MEASUREV33UUT,
  35. CMD_MEASUREV5AUX,
  36. CMD_MEASUREA5,
  37. CMD_MEASUREA12,
  38. CMD_MEASUREA33,
  39. CMD_FASTRAMP,
  40. CMD_RST,
  41. CMD_RSTDEFAULT,
  42. CMD_GETPME,
  43. };
  44. struct pcibx_command {
  45. enum command_id id;
  46. union {
  47. int boolean;
  48. double d;
  49. } u;
  50. };
  51. struct cmdline_args {
  52. int verbose;
  53. int sched;
  54. int cycle_delay;
  55. int nrcycle;
  56. const char *port;
  57. int is_PCI_1;
  58. #define MAX_COMMAND 512
  59. struct pcibx_command commands[MAX_COMMAND];
  60. int nr_commands;
  61. };
  62. extern struct cmdline_args cmdargs;
  63. #endif /* PCIBX_H_ */