Add note about acks option
This commit is contained in:
parent
ea9665a100
commit
8f0f9dbc3c
2 changed files with 20 additions and 4 deletions
|
@ -13,6 +13,15 @@ static pthread_t tid;
|
||||||
|
|
||||||
static CableHandle* cable_handle;
|
static CableHandle* cable_handle;
|
||||||
|
|
||||||
|
void show_help() {
|
||||||
|
log(LEVEL_INFO, "Syntax: tibridge [--no-handle-acks|--handle-acks]\n");
|
||||||
|
log(LEVEL_INFO,
|
||||||
|
"--no-handle-acks: By default, ACKs (-/+) will be hidden from the client.\n"
|
||||||
|
" This is necessary for working with z88dk-gdb. If you're\n"
|
||||||
|
" using a better client, you can disable this."
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
int hex(char ch) {
|
int hex(char ch) {
|
||||||
if ((ch >= 'a') && (ch <= 'f'))
|
if ((ch >= 'a') && (ch <= 'f'))
|
||||||
return (ch - 'a' + 10);
|
return (ch - 'a' + 10);
|
||||||
|
@ -90,6 +99,8 @@ int main(int argc, char *argv[]) {
|
||||||
const struct option long_opts[] = {
|
const struct option long_opts[] = {
|
||||||
{"handle-acks", no_argument, &handle_acks, 1},
|
{"handle-acks", no_argument, &handle_acks, 1},
|
||||||
{"no-handle-acks", no_argument, &handle_acks, 0},
|
{"no-handle-acks", no_argument, &handle_acks, 0},
|
||||||
|
|
||||||
|
{"help", no_argument, 0, 'h'},
|
||||||
{0,0,0,0}
|
{0,0,0,0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -100,6 +111,10 @@ int main(int argc, char *argv[]) {
|
||||||
if(opt == 0 && long_opts[opt_index].flag) {
|
if(opt == 0 && long_opts[opt_index].flag) {
|
||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
else if(opt == 'h') {
|
||||||
|
show_help();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
log(LEVEL_DEBUG, "handle acks: %d\n", handle_acks);
|
log(LEVEL_DEBUG, "handle acks: %d\n", handle_acks);
|
||||||
|
|
|
@ -20,6 +20,10 @@ static int reset_ram = 0;
|
||||||
static CalcHandle *calc_handle = NULL;
|
static CalcHandle *calc_handle = NULL;
|
||||||
static CalcModel model = CALC_NONE;
|
static CalcModel model = CALC_NONE;
|
||||||
|
|
||||||
|
void show_help() {
|
||||||
|
log(LEVEL_INFO, "Syntax: tikeys [--reset-ram] [--keys=ABCDEFG123456789] [--subtype=mirage --program=PROGNAME]\n");
|
||||||
|
}
|
||||||
|
|
||||||
static void send_key(uint32_t key, int retry) {
|
static void send_key(uint32_t key, int retry) {
|
||||||
usleep(100000);
|
usleep(100000);
|
||||||
int err;
|
int err;
|
||||||
|
@ -68,10 +72,6 @@ static int get_program_index(GNode *tree, char* program) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void show_help() {
|
|
||||||
log(LEVEL_INFO, "Syntax: tikeys [--reset-ram] [--keys=ABCDEFG123456789] [--subtype=mirage --program=PROGNAME]\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
utils_parse_args(argc, argv);
|
utils_parse_args(argc, argv);
|
||||||
|
|
||||||
|
@ -80,6 +80,7 @@ int main(int argc, char *argv[]) {
|
||||||
{"program", required_argument, 0, 'p'},
|
{"program", required_argument, 0, 'p'},
|
||||||
{"keys", required_argument, 0, 'k'},
|
{"keys", required_argument, 0, 'k'},
|
||||||
{"reset-ram", no_argument, &reset_ram, 1},
|
{"reset-ram", no_argument, &reset_ram, 1},
|
||||||
|
|
||||||
{"help", no_argument, 0, 'h'},
|
{"help", no_argument, 0, 'h'},
|
||||||
{0,0,0,0}
|
{0,0,0,0}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue