comparison rvinterf/tmsh/l1cmd.c @ 128:d76970e1895e

fc-tmsh: ttw command implemented
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 19 Feb 2017 16:05:21 +0000
parents 777172bcea3c
children bf610ca0f1b1
comparison
equal deleted inserted replaced
127:db7fc16bac1e 128:d76970e1895e
451 cmdpkt[2] = index; 451 cmdpkt[2] = index;
452 cmdpkt[3] = index >> 8; 452 cmdpkt[3] = index >> 8;
453 send_etm_cmd(cmdpkt, 3); 453 send_etm_cmd(cmdpkt, 3);
454 return(0); 454 return(0);
455 } 455 }
456
457 cmd_ttw(argc, argv)
458 char **argv;
459 {
460 unsigned index;
461 u_char cmdpkt[36];
462 int rc;
463
464 index = strtoul(argv[1], 0, 0);
465 if (index >= 16) {
466 printf("error: index out of range\n");
467 return(ERROR_USAGE);
468 }
469 cmdpkt[1] = TX_TEMPLATE_WRITE;
470 cmdpkt[2] = index;
471 rc = read_tx_ramp_template(argv[2], cmdpkt + 3);
472 if (rc)
473 return(rc);
474 send_etm_cmd(cmdpkt, 34);
475 return(0);
476 }