cmd_mtc.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * (C) Copyright 2009
  3. * Werner Pfister <Pfister_Werner@intercontrol.de>
  4. *
  5. * (C) Copyright 2009 Semihalf, Grzegorz Bernacki
  6. *
  7. * See file CREDITS for list of people who contributed to this
  8. * project.
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License as
  12. * published by the Free Software Foundation; either version 2 of
  13. * the License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  23. * MA 02111-1307 USA
  24. */
  25. #ifndef CMD_MTC_H
  26. #define CMD_MTC_H
  27. #define CMD_WD_PARA 0x02
  28. #define CMD_WD_WDSTATE 0x04
  29. #define CMD_FW_VERSION 0x10
  30. #define CMD_GET_VIM 0x30
  31. #define CMD_SET_LED 0x40
  32. typedef struct {
  33. u8 cmd;
  34. u8 sys_in;
  35. u8 cmd_val0;
  36. u8 cmd_val1;
  37. u8 cmd_val2;
  38. u8 user_out;
  39. u8 cks;
  40. u8 dummy1;
  41. u8 dummy2;
  42. } tx_msp_cmd;
  43. typedef struct {
  44. u8 input;
  45. u8 state;
  46. u8 ack2;
  47. u8 ack3;
  48. u8 ack0;
  49. u8 ack1;
  50. u8 ack;
  51. u8 dummy;
  52. u8 cks;
  53. } rx_msp_cmd;
  54. #define MTC_TRANSFER_SIZE (sizeof(tx_msp_cmd) * 8)
  55. #endif