Grzegorz Bernacki | d08c9d8 | 2009-06-12 11:33:54 +0200 | [diff] [blame^] | 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 | |
| 26 | #ifndef CMD_MTC_H |
| 27 | #define CMD_MTC_H |
| 28 | |
| 29 | #define CMD_WD_PARA 0x02 |
| 30 | #define CMD_FW_VERSION 0x10 |
| 31 | #define CMD_GET_VIM 0x30 |
| 32 | #define CMD_SET_LED 0x40 |
| 33 | |
| 34 | typedef struct { |
| 35 | u8 cmd; |
| 36 | u8 sys_in; |
| 37 | u8 cmd_val0; |
| 38 | u8 cmd_val1; |
| 39 | u8 cmd_val2; |
| 40 | u8 user_out; |
| 41 | u8 cks; |
| 42 | u8 dummy1; |
| 43 | u8 dummy2; |
| 44 | } tx_msp_cmd; |
| 45 | |
| 46 | typedef struct { |
| 47 | u8 input; |
| 48 | u8 state; |
| 49 | u8 ack2; |
| 50 | u8 ack3; |
| 51 | u8 ack0; |
| 52 | u8 ack1; |
| 53 | u8 ack; |
| 54 | u8 dummy; |
| 55 | u8 cks; |
| 56 | } rx_msp_cmd; |
| 57 | |
| 58 | #define MTC_TRANSFER_SIZE (sizeof(tx_msp_cmd) * 8) |
| 59 | |
| 60 | #endif |