Revision 178
| trunk/toolbox/bootloader/tooltron.h (revision 178) | ||
|---|---|---|
| 1 |
/******** |
|
| 2 |
* This file is part of Tooltron. |
|
| 3 |
* |
|
| 4 |
* Tooltron is free software: you can redistribute it and/or modify |
|
| 5 |
* it under the terms of the Lesser GNU General Public License as published by |
|
| 6 |
* the Free Software Foundation, either version 3 of the License, or |
|
| 7 |
* (at your option) any later version. |
|
| 8 |
* |
|
| 9 |
* Tooltron is distributed in the hope that it will be useful, |
|
| 10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 12 |
* Lesser GNU General Public License for more details. |
|
| 13 |
* You should have received a copy of the Lesser GNU General Public License |
|
| 14 |
* along with Tooltron. If not, see <http://www.gnu.org/licenses/>. |
|
| 15 |
* |
|
| 16 |
* Copyright 2009 Kevin Woo <kwoo@2ndt.com> |
|
| 17 |
* |
|
| 18 |
********/ |
|
| 19 |
#ifndef _TOOLTRON_H_ |
|
| 20 |
#define _TOOLTRON_H_ |
|
| 21 |
|
|
| 22 |
#define DELIM '^' |
|
| 23 |
#define SERVER 1 |
|
| 24 |
#define ACK_CRC ADDR ^ SERVER |
|
| 25 |
|
|
| 26 |
#define TT_GET_KEY 'k' |
|
| 27 |
#define TT_ACK 'a' |
|
| 28 |
#define TT_NACK 'n' |
|
| 29 |
#define TT_TO 'f' |
|
| 30 |
#define TT_TIMEOUT 't' |
|
| 31 |
#define TT_RESET 'r' |
|
| 32 |
#define TT_BOOT 'b' |
|
| 33 |
#define TT_PROGM 'p' |
|
| 34 |
#define TT_PROGD 'd' |
|
| 35 |
#define TT_BAD 0 |
|
| 36 |
|
|
| 37 |
#define PROGM_PACKET_SIZE 2 |
|
| 38 |
#define PROGD_PACKET_SIZE 32 |
|
| 39 |
|
|
| 40 |
#define PAGE_SIZE 32 |
|
| 41 |
|
|
| 42 |
#define TIMEOUT_SECONDS 10 |
|
| 43 |
|
|
| 44 |
#endif |
|
| trunk/common/tooltron.h (revision 178) | ||
|---|---|---|
| 1 |
/******** |
|
| 2 |
* This file is part of Tooltron. |
|
| 3 |
* |
|
| 4 |
* Tooltron is free software: you can redistribute it and/or modify |
|
| 5 |
* it under the terms of the Lesser GNU General Public License as published by |
|
| 6 |
* the Free Software Foundation, either version 3 of the License, or |
|
| 7 |
* (at your option) any later version. |
|
| 8 |
* |
|
| 9 |
* Tooltron is distributed in the hope that it will be useful, |
|
| 10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 12 |
* Lesser GNU General Public License for more details. |
|
| 13 |
* You should have received a copy of the Lesser GNU General Public License |
|
| 14 |
* along with Tooltron. If not, see <http://www.gnu.org/licenses/>. |
|
| 15 |
* |
|
| 16 |
* Copyright 2009 Kevin Woo <kwoo@2ndt.com> |
|
| 17 |
* |
|
| 18 |
********/ |
|
| 19 |
#ifndef _TOOLTRON_H_ |
|
| 20 |
#define _TOOLTRON_H_ |
|
| 21 |
|
|
| 22 |
#define DELIM '^' |
|
| 23 |
#define SERVER 1 |
|
| 24 |
#define ACK_CRC ADDR ^ SERVER |
|
| 25 |
|
|
| 26 |
#define TT_GET_KEY 'k' |
|
| 27 |
#define TT_ACK 'a' |
|
| 28 |
#define TT_NACK 'n' |
|
| 29 |
#define TT_TO 'f' |
|
| 30 |
#define TT_TIMEOUT 't' |
|
| 31 |
#define TT_RESET 'r' |
|
| 32 |
#define TT_BOOT 'b' |
|
| 33 |
#define TT_PROGM 'p' |
|
| 34 |
#define TT_PROGD 'd' |
|
| 35 |
#define TT_BAD 0 |
|
| 36 |
|
|
| 37 |
#define PROGM_PACKET_SIZE 2 |
|
| 38 |
#define PROGD_PACKET_SIZE 32 |
|
| 39 |
|
|
| 40 |
#define PAGE_SIZE 32 |
|
| 41 |
|
|
| 42 |
#define TIMEOUT_SECONDS 10 |
|
| 43 |
|
|
| 44 |
#endif |
|
Also available in: Unified diff