-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
testmode: Add a test-headers command
- Loading branch information
Showing
3 changed files
with
99 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* testmode.h | ||
* | ||
* Greaseweazle test-mode command protocol. Subject to change! | ||
* | ||
* Written & released by Keir Fraser <[email protected]> | ||
* | ||
* This is free and unencumbered software released into the public domain. | ||
* See the file COPYING for more details, or visit <http://unlicense.org>. | ||
*/ | ||
|
||
#define CMD_option_bytes 0 | ||
#define CMD_pins 1 | ||
#define CMD_led 2 | ||
#define CMD_test_headers 3 | ||
|
||
/* CMD_test_headers return code in rsp.u.x[0] */ | ||
#define TESTHEADER_success 100 | ||
|
||
struct cmd { | ||
uint32_t cmd; | ||
union { | ||
uint8_t pins[64/8]; | ||
uint32_t x[28/4]; | ||
} u; | ||
}; | ||
|
||
struct rsp { | ||
union { | ||
uint8_t opt[32]; | ||
uint8_t pins[64/8]; | ||
uint32_t x[32/4]; | ||
} u; | ||
}; | ||
|
||
/* | ||
* Local variables: | ||
* mode: C | ||
* c-file-style: "Linux" | ||
* c-basic-offset: 4 | ||
* tab-width: 4 | ||
* indent-tabs-mode: nil | ||
* End: | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters