1 /** 2 * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. \n 14 * Licensed under the Apache License, Version 2.0 (the "License"); 15 * you may not use this file except in compliance with the License. 16 * You may obtain a copy of the License at 17 * 18 * http://www.apache.org/licenses/LICENSE-2.0 19 * 20 * Unless required by applicable law or agreed to in writing, software 21 * distributed under the License is distributed on an "AS IS" BASIS, 22 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 23 * See the License for the specific language governing permissions and 24 * limitations under the License. * 25 * Description: At plt cmd table \n 26 */ 27 28 #if !defined(AT_PLT_CMD_TALBE_H) 29 #define AT_PLT_CMD_TALBE_H 30 31 #include "at.h" 32 typedef struct { 33 uint32_t para_map; 34 int32_t key_id; /* Range: 0..65535 */ 35 } nvread_args_t; 36 37 typedef struct { 38 uint32_t para_map; 39 uint32_t key_id; /* Range: 0..65535 */ 40 int32_t attr; 41 uint32_t length; /* Range: 0..32 */ 42 const uint8_t *value; /* Length: 32 */ 43 } nvwrite_args_t; 44 45 typedef struct { 46 uint32_t para_map; 47 uint32_t run_region; 48 } absetrun_args_t; 49 50 typedef struct { 51 uint32_t para_map; 52 const uint8_t *mac_addr; /* Optional. Length: 17 */ 53 int32_t mac_type; 54 } efusemac_args_t; 55 56 typedef struct { 57 uint32_t para_map; 58 const char *delay_time; 59 } reboot_args_t; 60 61 typedef struct { 62 uint32_t para_map; 63 } mfgflag_args_t; 64 65 typedef struct { 66 uint32_t para_map; 67 } dieid_args_t; 68 69 typedef struct { 70 uint32_t para_map; 71 const uint8_t *para1; /* 每个项目存在差异 */ 72 } customer_rsvd_efuse_args_t; 73 74 typedef struct { 75 uint32_t para_map; 76 int32_t para1; 77 } ssijtag_args_t; 78 79 typedef struct { 80 uint32_t para_map; 81 const uint8_t *para1; /* Length: 66 */ 82 } pubkey_args_t; 83 84 typedef struct { 85 uint32_t para_map; 86 int32_t para1; 87 } secverify_args_t; 88 89 typedef struct { 90 uint32_t para_map; 91 uint32_t addr; /* Range: 0.. */ 92 uint32_t length; /* Range: 0..4096 */ 93 } flashread_args_t; 94 95 typedef struct { 96 uint32_t para_map; 97 uint32_t addr; /* Range: 0.. */ 98 uint32_t length; /* Range: 0..1024 */ 99 const uint8_t *data; /* Optional. Length: 2048 */ 100 } flashwrite_args_t; 101 102 typedef union { 103 nvread_args_t nvread; 104 nvwrite_args_t nvwrite; 105 absetrun_args_t absetrun; 106 efusemac_args_t efusemac; 107 reboot_args_t reboot; 108 mfgflag_args_t mfgflag; 109 dieid_args_t dieid; 110 customer_rsvd_efuse_args_t customer_rsvd_efuse; 111 ssijtag_args_t ssijtag; 112 pubkey_args_t pubkey; 113 secverify_args_t secverify; 114 flashread_args_t flashread; 115 flashwrite_args_t flashwrite; 116 } at_plt_cmd_args_t; 117 118 // factory mode at cmd args 119 typedef struct { 120 uint32_t para_map; 121 int32_t para1; /* Range: 0~7 */ 122 } factory_mode_args_t; 123 124 // uart log level at cmd args 125 typedef struct { 126 uint32_t para_map; 127 int32_t para1; /* Range: 0~7 */ 128 } loglevel_args_t; 129 130 typedef struct { 131 uint32_t para_map; 132 int32_t para1; /* Range: 0~2 */ 133 } sleepmode_args_t; 134 135 typedef struct { 136 uint32_t para_map; 137 int32_t para1; /* Range: 0..128 */ 138 } pm_args_t; 139 140 typedef struct { 141 uint32_t para_map; 142 int32_t para1; /* Range: 0~2 */ 143 int32_t para2; /* Range: 0~2 */ 144 int32_t para3; /* Range: 0~2 */ 145 } uartport_args_t; 146 147 // gpio at cmd args 148 typedef struct { 149 uint32_t para_map; 150 int32_t para1; /* Range: 0~14 */ 151 } getiomode_args_t; 152 153 typedef struct { 154 uint32_t para_map; 155 int32_t para1; /* Range: 0~14 */ 156 int32_t para2; /* Range: 0~14 */ 157 int32_t para3; /* Range: 0~14 */ 158 int32_t para4; /* Range: 0~14 */ 159 } setiomode_args_t; 160 161 typedef struct { 162 uint32_t para_map; 163 int32_t para1; /* Range: 0~14 */ 164 int32_t para2; 165 } gpiodir_args_t; 166 167 typedef struct { 168 uint32_t para_map; 169 int32_t para1; /* Range: 0~14 */ 170 int32_t para2; 171 } wrgpio_args_t; 172 173 typedef struct { 174 uint32_t para_map; 175 int32_t para1; /* Range: 0~14 */ 176 } rdgpio_args_t; 177 178 typedef struct { 179 uint32_t para_map; 180 const char *para1; /* Length: 32 */ 181 } date_args_t; 182 183 typedef struct { 184 uint32_t para_map; 185 const uint8_t *license; /* Length: 4096 */ 186 } license_args_t; 187 188 /* AT Command */ 189 at_ret_t plt_nv_read(const nvread_args_t *args); 190 191 /* AT Command */ 192 at_ret_t plt_nv_write(const nvwrite_args_t *args); 193 194 /* SET AB RUN REGION */ 195 at_ret_t upg_ab_set_run_region(const absetrun_args_t *args); 196 197 /* SET MAC ADDR */ 198 at_ret_t get_efuse_mac_addr(void); 199 at_ret_t set_efuse_mac_addr(const efusemac_args_t *args); 200 201 /* AT Command */ 202 at_ret_t plt_reboot(void); 203 204 /* AT+CSV */ 205 at_ret_t at_query_ver_cmd(void); 206 207 /* AT+RDTEMP */ 208 at_ret_t at_query_tsensor_temp(void); 209 210 /* AT+XTALCOM */ 211 at_ret_t at_query_xtal_compesation(void); 212 213 /* AT+FTM */ 214 at_ret_t at_factory_erase(void); 215 at_ret_t at_factory_mode_switch(const factory_mode_args_t *args); 216 at_ret_t at_factory_mode_read(void); 217 218 /* AT+LOGL */ 219 at_ret_t at_get_log_level(void); 220 at_ret_t at_set_log_level(const loglevel_args_t *args); 221 222 /* AT+SLP */ 223 at_ret_t at_get_sleep_mode(void); 224 at_ret_t at_set_sleep_mode(const sleepmode_args_t *args); 225 226 /* AT+SETUART */ 227 at_ret_t at_set_uart_port(const uartport_args_t *args); 228 229 /* AT+GPIODIR */ 230 at_ret_t at_set_gpio_dir(const gpiodir_args_t *args); 231 232 /* AT+GETIOMODE */ 233 at_ret_t at_get_iomode(const getiomode_args_t *args); 234 235 /* AT+SETIOMODE */ 236 at_ret_t at_set_iomode(const setiomode_args_t *args); 237 238 /* AT+WTGPIO */ 239 at_ret_t at_wrgpio(const wrgpio_args_t *args); 240 241 /* AT+RDGPIO */ 242 at_ret_t at_rdgpio(const rdgpio_args_t *args); 243 244 /* AT+DUMP */ 245 at_ret_t at_get_dump(void); 246 247 /* AT+RST */ 248 at_ret_t at_exe_reset_cmd(void); 249 at_ret_t at_set_reset_cmd(const reboot_args_t *args); 250 251 /* AT+DATE */ 252 at_ret_t at_date_cmd(void); 253 at_ret_t at_date_set_cmd(const date_args_t *args); 254 255 /* AT+HELP */ 256 at_ret_t at_help(void); 257 258 /* AT+PM */ 259 at_ret_t cmd_set_pm(const pm_args_t *args); 260 261 /* AT+MFGFLAG */ 262 at_ret_t cmd_write_mfg_flag(void); 263 264 /* AT+DIEID */ 265 at_ret_t cmd_get_dieid(void); 266 267 /* AT+CUSTOMEFUSE */ 268 at_ret_t cmd_set_customer_rsvd_efuse(const customer_rsvd_efuse_args_t *args); 269 at_ret_t cmd_get_customer_rsvd_efuse(void); 270 271 /* AT+SSIJTAG */ 272 at_ret_t cmd_disable_ssi_jtag(void); 273 at_ret_t cmd_get_ssi_jtag_status(void); 274 275 /* AT+PUBKEY */ 276 at_ret_t cmd_set_hash_root_public_key(const pubkey_args_t *args); 277 at_ret_t cmd_get_hash_root_public_key(void); 278 279 /* AT+SECVERIFY */ 280 at_ret_t cmd_sec_verify_enable(void); 281 at_ret_t cmd_get_sec_verify_status(void); 282 283 /* AT Command */ 284 at_ret_t plt_flash_read(const flashread_args_t *args); 285 286 /* AT Command */ 287 at_ret_t plt_flash_write(const flashwrite_args_t *args); 288 289 /* AT+LICENSE */ 290 at_ret_t save_license(const license_args_t *args); 291 292 const at_para_parse_syntax_t nvread_syntax[] = { 293 { 294 .type = AT_SYNTAX_TYPE_INT, 295 .last = true, 296 .attribute = AT_SYNTAX_ATTR_AT_MIN_VALUE | AT_SYNTAX_ATTR_AT_MAX_VALUE, 297 .entry.int_range.min_val = 0, 298 .entry.int_range.max_val = 65535, 299 .offset = offsetof(nvread_args_t, key_id) 300 }, 301 }; 302 303 const int32_t nvwrite_para2_values[] = { 304 0, 1, 2, 4 305 }; 306 const at_para_parse_syntax_t nvwrite_syntax[] = { 307 { 308 .type = AT_SYNTAX_TYPE_INT, 309 .attribute = AT_SYNTAX_ATTR_AT_MIN_VALUE | AT_SYNTAX_ATTR_AT_MAX_VALUE, 310 .entry.int_range.min_val = 0, 311 .entry.int_range.max_val = 65535, 312 .offset = offsetof(nvwrite_args_t, key_id) 313 }, 314 { 315 .type = AT_SYNTAX_TYPE_INT, 316 .attribute = AT_SYNTAX_ATTR_LIST_VALUE, 317 .entry.int_list = {4, nvwrite_para2_values}, 318 .offset = offsetof(nvwrite_args_t, attr) 319 }, 320 { 321 .type = AT_SYNTAX_TYPE_INT, 322 .attribute = AT_SYNTAX_ATTR_AT_MIN_VALUE | AT_SYNTAX_ATTR_AT_MAX_VALUE, 323 .entry.int_range.min_val = 0, 324 .entry.int_range.max_val = 1024, 325 .offset = offsetof(nvwrite_args_t, length) 326 }, 327 { 328 .type = AT_SYNTAX_TYPE_STRING, 329 .last = true, 330 .attribute = AT_SYNTAX_ATTR_OPTIONAL | AT_SYNTAX_ATTR_MAX_LENGTH | AT_SYNTAX_ATTR_FIX_CASE, 331 .entry.string.max_length = 2048, 332 .offset = offsetof(nvwrite_args_t, value) 333 }, 334 }; 335 336 const int32_t absetrun_run_region_values[] = { 337 0, 1, 2 338 }; 339 340 const at_para_parse_syntax_t absetrun_syntax[] = { 341 { 342 .type = AT_SYNTAX_TYPE_INT, 343 .last = true, 344 .attribute = AT_SYNTAX_ATTR_LIST_VALUE, 345 .entry.int_list = {3, absetrun_run_region_values}, 346 .offset = offsetof(absetrun_args_t, run_region) 347 }, 348 }; 349 350 const int32_t efusemac_mac_type_values[] = { 351 0, 1, 2 352 }; 353 const at_para_parse_syntax_t efusemac_syntax[] = { 354 { 355 .type = AT_SYNTAX_TYPE_STRING, 356 .attribute = AT_SYNTAX_ATTR_OPTIONAL | AT_SYNTAX_ATTR_MAX_LENGTH, 357 .entry.string.max_length = 17, 358 .offset = offsetof(efusemac_args_t, mac_addr) 359 }, 360 { 361 .type = AT_SYNTAX_TYPE_INT, 362 .last = true, 363 .attribute = AT_SYNTAX_ATTR_LIST_VALUE, 364 .entry.int_list = {(sizeof(efusemac_mac_type_values) / sizeof(int32_t)), efusemac_mac_type_values}, 365 .offset = offsetof(efusemac_args_t, mac_type) 366 }, 367 }; 368 369 const at_para_parse_syntax_t factory_mode_syntax[] = { 370 { 371 .type = AT_SYNTAX_TYPE_INT, 372 .last = true, 373 .attribute = AT_SYNTAX_ATTR_AT_MIN_VALUE | AT_SYNTAX_ATTR_AT_MAX_VALUE, 374 .entry.int_range.min_val = 0, 375 .entry.int_range.max_val = 1, 376 .offset = offsetof(factory_mode_args_t, para1) 377 }, 378 }; 379 380 const at_para_parse_syntax_t loglevel_syntax[] = { 381 { 382 .type = AT_SYNTAX_TYPE_INT, 383 .last = true, 384 .attribute = AT_SYNTAX_ATTR_AT_MIN_VALUE | AT_SYNTAX_ATTR_AT_MAX_VALUE, 385 .entry.int_range.min_val = 0, 386 .entry.int_range.max_val = 7, 387 .offset = offsetof(loglevel_args_t, para1) 388 }, 389 }; 390 391 const at_para_parse_syntax_t sleepmode_syntax[] = { 392 { 393 .type = AT_SYNTAX_TYPE_INT, 394 .last = true, 395 .attribute = AT_SYNTAX_ATTR_AT_MIN_VALUE | AT_SYNTAX_ATTR_AT_MAX_VALUE, 396 .entry.int_range.min_val = 0, 397 .entry.int_range.max_val = 2, 398 .offset = offsetof(sleepmode_args_t, para1) 399 }, 400 }; 401 402 const at_para_parse_syntax_t uartport_syntax[] = { 403 { 404 .type = AT_SYNTAX_TYPE_INT, 405 .attribute = AT_SYNTAX_ATTR_AT_MIN_VALUE | AT_SYNTAX_ATTR_AT_MAX_VALUE, 406 .entry.int_range.min_val = 0, 407 .entry.int_range.max_val = 2, 408 .offset = offsetof(uartport_args_t, para1) 409 }, 410 { 411 .type = AT_SYNTAX_TYPE_INT, 412 .attribute = AT_SYNTAX_ATTR_AT_MIN_VALUE | AT_SYNTAX_ATTR_AT_MAX_VALUE, 413 .entry.int_range.min_val = 0, 414 .entry.int_range.max_val = 2, 415 .offset = offsetof(uartport_args_t, para2) 416 }, 417 { 418 .type = AT_SYNTAX_TYPE_INT, 419 .last = true, 420 .attribute = AT_SYNTAX_ATTR_AT_MIN_VALUE | AT_SYNTAX_ATTR_AT_MAX_VALUE, 421 .entry.int_range.min_val = 0, 422 .entry.int_range.max_val = 2, 423 .offset = offsetof(uartport_args_t, para3) 424 }, 425 }; 426 427 const at_para_parse_syntax_t getiomode_syntax[] = { 428 { 429 .type = AT_SYNTAX_TYPE_INT, 430 .last = true, 431 .attribute = AT_SYNTAX_ATTR_AT_MIN_VALUE | AT_SYNTAX_ATTR_AT_MAX_VALUE, 432 .entry.int_range.min_val = 0, 433 .entry.int_range.max_val = 255, 434 .offset = offsetof(getiomode_args_t, para1) 435 }, 436 }; 437 438 const at_para_parse_syntax_t setiomode_syntax[] = { 439 { 440 .type = AT_SYNTAX_TYPE_INT, 441 .attribute = AT_SYNTAX_ATTR_AT_MIN_VALUE | AT_SYNTAX_ATTR_AT_MAX_VALUE, 442 .entry.int_range.min_val = 0, 443 .entry.int_range.max_val = 255, 444 .offset = offsetof(setiomode_args_t, para1) 445 }, 446 { 447 .type = AT_SYNTAX_TYPE_INT, 448 .attribute = AT_SYNTAX_ATTR_AT_MIN_VALUE | AT_SYNTAX_ATTR_AT_MAX_VALUE, 449 .entry.int_range.min_val = 0, 450 .entry.int_range.max_val = 255, 451 .offset = offsetof(setiomode_args_t, para2) 452 }, 453 { 454 .type = AT_SYNTAX_TYPE_INT, 455 .attribute = AT_SYNTAX_ATTR_AT_MIN_VALUE | AT_SYNTAX_ATTR_AT_MAX_VALUE, 456 .entry.int_range.min_val = 0, 457 .entry.int_range.max_val = 255, 458 .offset = offsetof(setiomode_args_t, para3) 459 }, 460 { 461 .type = AT_SYNTAX_TYPE_INT, 462 .last = true, 463 .attribute = AT_SYNTAX_ATTR_AT_MIN_VALUE | AT_SYNTAX_ATTR_AT_MAX_VALUE, 464 .entry.int_range.min_val = 0, 465 .entry.int_range.max_val = 255, 466 .offset = offsetof(setiomode_args_t, para4) 467 }, 468 }; 469 470 const int32_t gpiodir_para2_values[] = { 471 0, 1 472 }; 473 474 const at_para_parse_syntax_t gpiodir_syntax[] = { 475 { 476 .type = AT_SYNTAX_TYPE_INT, 477 .attribute = AT_SYNTAX_ATTR_AT_MIN_VALUE | AT_SYNTAX_ATTR_AT_MAX_VALUE, 478 .entry.int_range.min_val = 0, 479 .entry.int_range.max_val = 255, 480 .offset = offsetof(gpiodir_args_t, para1) 481 }, 482 { 483 .type = AT_SYNTAX_TYPE_INT, 484 .last = true, 485 .attribute = AT_SYNTAX_ATTR_LIST_VALUE, 486 .entry.int_list = {2, gpiodir_para2_values}, 487 .offset = offsetof(gpiodir_args_t, para2) 488 }, 489 }; 490 491 const int32_t wrgpio_para2_values[] = { 492 0, 1 493 }; 494 495 const at_para_parse_syntax_t wrgpio_syntax[] = { 496 { 497 .type = AT_SYNTAX_TYPE_INT, 498 .attribute = AT_SYNTAX_ATTR_AT_MIN_VALUE | AT_SYNTAX_ATTR_AT_MAX_VALUE, 499 .entry.int_range.min_val = 0, 500 .entry.int_range.max_val = 255, 501 .offset = offsetof(wrgpio_args_t, para1) 502 }, 503 { 504 .type = AT_SYNTAX_TYPE_INT, 505 .last = true, 506 .attribute = AT_SYNTAX_ATTR_LIST_VALUE, 507 .entry.int_list = {2, wrgpio_para2_values}, 508 .offset = offsetof(wrgpio_args_t, para2) 509 }, 510 }; 511 512 const at_para_parse_syntax_t pm_syntax[] = { 513 { 514 .type = AT_SYNTAX_TYPE_INT, 515 .last = true, 516 .attribute = AT_SYNTAX_ATTR_AT_MIN_VALUE | AT_SYNTAX_ATTR_AT_MAX_VALUE, 517 .entry.int_range.min_val = 0, 518 .entry.int_range.max_val = 128, 519 .offset = offsetof(pm_args_t, para1) 520 }, 521 }; 522 523 const at_para_parse_syntax_t rdgpio_syntax[] = { 524 { 525 .type = AT_SYNTAX_TYPE_INT, 526 .last = true, 527 .attribute = AT_SYNTAX_ATTR_AT_MIN_VALUE | AT_SYNTAX_ATTR_AT_MAX_VALUE, 528 .entry.int_range.min_val = 0, 529 .entry.int_range.max_val = 255, 530 .offset = offsetof(rdgpio_args_t, para1) 531 }, 532 }; 533 534 const at_para_parse_syntax_t date_syntax[] = { 535 { 536 .type = AT_SYNTAX_TYPE_STRING, 537 .last = true, 538 .attribute = AT_SYNTAX_ATTR_MAX_LENGTH, 539 .entry.string.max_length = 32, 540 .offset = offsetof(date_args_t, para1) 541 }, 542 }; 543 544 const at_para_parse_syntax_t rst_syntax[] = { 545 { 546 .type = AT_SYNTAX_TYPE_STRING, 547 .last = true, 548 .attribute = AT_SYNTAX_ATTR_MAX_LENGTH, 549 .entry.string.max_length = 32, 550 .offset = offsetof(reboot_args_t,delay_time ) 551 }, 552 }; 553 554 const at_para_parse_syntax_t customer_rsvd_efuse_syntax[] = { 555 { 556 .type = AT_SYNTAX_TYPE_STRING, 557 .last = true, 558 .attribute = AT_SYNTAX_ATTR_MAX_LENGTH, 559 .entry.string.max_length = 130, 560 .offset = offsetof(customer_rsvd_efuse_args_t, para1) 561 }, 562 }; 563 564 const at_para_parse_syntax_t pubkey_syntax[] = { 565 { 566 .type = AT_SYNTAX_TYPE_STRING, 567 .last = true, 568 .attribute = AT_SYNTAX_ATTR_MAX_LENGTH, 569 .entry.string.max_length = 66, 570 .offset = offsetof(pubkey_args_t, para1) 571 }, 572 }; 573 574 const at_para_parse_syntax_t flashread_syntax[] = { 575 { 576 .type = AT_SYNTAX_TYPE_INT, 577 .attribute = AT_SYNTAX_ATTR_AT_MIN_VALUE, 578 .entry.int_range.min_val = 0, 579 .offset = offsetof(flashread_args_t, addr) 580 }, 581 { 582 .type = AT_SYNTAX_TYPE_INT, 583 .last = true, 584 .attribute = AT_SYNTAX_ATTR_AT_MIN_VALUE | AT_SYNTAX_ATTR_AT_MAX_VALUE, 585 .entry.int_range.min_val = 0, 586 .entry.int_range.max_val = 4096, 587 .offset = offsetof(flashread_args_t, length) 588 }, 589 }; 590 591 const at_para_parse_syntax_t flashwrite_syntax[] = { 592 { 593 .type = AT_SYNTAX_TYPE_INT, 594 .attribute = AT_SYNTAX_ATTR_AT_MIN_VALUE, 595 .entry.int_range.min_val = 0, 596 .offset = offsetof(flashwrite_args_t, addr) 597 }, 598 { 599 .type = AT_SYNTAX_TYPE_INT, 600 .attribute = AT_SYNTAX_ATTR_AT_MIN_VALUE | AT_SYNTAX_ATTR_AT_MAX_VALUE, 601 .entry.int_range.min_val = 0, 602 .entry.int_range.max_val = 1024, 603 .offset = offsetof(flashwrite_args_t, length) 604 }, 605 { 606 .type = AT_SYNTAX_TYPE_STRING, 607 .last = true, 608 .attribute = AT_SYNTAX_ATTR_OPTIONAL | AT_SYNTAX_ATTR_MAX_LENGTH, 609 .entry.string.max_length = 2048, 610 .offset = offsetof(flashwrite_args_t, data) 611 }, 612 }; 613 614 const at_para_parse_syntax_t license_syntax[] = { 615 { 616 .type = AT_SYNTAX_TYPE_STRING, 617 .last = true, 618 .attribute = AT_SYNTAX_ATTR_MAX_LENGTH, 619 .entry.string.max_length = 4096, 620 .offset = offsetof(license_args_t, license) 621 }, 622 }; 623 624 const at_cmd_entry_t at_plt_cmd_parse_table[] = { 625 { 626 "NVREAD", 627 2, 628 0, 629 nvread_syntax, 630 NULL, 631 (at_set_func_t)plt_nv_read, 632 NULL, 633 NULL, 634 }, 635 { 636 "NVWRITE", 637 1, 638 0, 639 nvwrite_syntax, 640 NULL, 641 (at_set_func_t)plt_nv_write, 642 NULL, 643 NULL, 644 }, 645 { 646 "ABSETRUN", 647 2, 648 0, 649 absetrun_syntax, 650 NULL, 651 (at_set_func_t)upg_ab_set_run_region, 652 NULL, 653 NULL, 654 }, 655 { 656 "EFUSEMAC", 657 2, 658 0, 659 efusemac_syntax, 660 NULL, 661 (at_set_func_t)set_efuse_mac_addr, 662 get_efuse_mac_addr, 663 NULL, 664 }, 665 { 666 "REBOOT", 667 2, 668 0, 669 NULL, 670 plt_reboot, 671 (at_set_func_t)NULL, 672 NULL, 673 NULL, 674 }, 675 { 676 "CSV", 677 8, 678 0, 679 NULL, 680 at_query_ver_cmd, 681 NULL, 682 NULL, 683 NULL, 684 }, 685 { 686 "RDTEMP", 687 8, 688 0, 689 NULL, 690 at_query_tsensor_temp, 691 NULL, 692 NULL, 693 NULL, 694 }, 695 { 696 "XTALCOM", 697 8, 698 0, 699 NULL, 700 at_query_xtal_compesation, 701 NULL, 702 NULL, 703 NULL, 704 }, 705 { 706 "FTMERASE", 707 8, 708 0, 709 NULL, 710 at_factory_erase, 711 NULL, 712 NULL, 713 NULL, 714 }, 715 { 716 "FTM", 717 8, 718 0, 719 factory_mode_syntax, 720 NULL, 721 (at_set_func_t)at_factory_mode_switch, 722 NULL, 723 (at_read_func_t)at_factory_mode_read, 724 }, 725 { 726 "LOGL", 727 8, 728 0, 729 loglevel_syntax, 730 at_get_log_level, 731 (at_set_func_t)at_set_log_level, 732 NULL, 733 NULL, 734 }, 735 { 736 "PM", 737 8, 738 0, 739 pm_syntax, 740 NULL, 741 (at_set_func_t)cmd_set_pm, 742 NULL, 743 NULL, 744 }, 745 { 746 "SLP", 747 8, 748 0, 749 sleepmode_syntax, 750 at_get_sleep_mode, 751 (at_set_func_t)at_set_sleep_mode, 752 NULL, 753 NULL, 754 }, 755 { 756 "SETUART", 757 8, 758 0, 759 uartport_syntax, 760 NULL, 761 (at_set_func_t)at_set_uart_port, 762 NULL, 763 NULL, 764 }, 765 { 766 "GPIODIR", 767 8, 768 0, 769 gpiodir_syntax, 770 NULL, 771 (at_set_func_t)at_set_gpio_dir, 772 NULL, 773 NULL, 774 }, 775 { 776 "GETIOMODE", 777 8, 778 0, 779 getiomode_syntax, 780 NULL, 781 (at_set_func_t)at_get_iomode, 782 NULL, 783 NULL, 784 }, 785 { 786 "SETIOMODE", 787 8, 788 0, 789 setiomode_syntax, 790 NULL, 791 (at_set_func_t)at_set_iomode, 792 NULL, 793 NULL, 794 }, 795 796 { 797 "RDGPIO", 798 8, 799 0, 800 rdgpio_syntax, 801 NULL, 802 (at_set_func_t)at_rdgpio, 803 NULL, 804 NULL, 805 }, 806 { 807 "WTGPIO", 808 8, 809 0, 810 wrgpio_syntax, 811 NULL, 812 (at_set_func_t)at_wrgpio, 813 NULL, 814 NULL, 815 }, 816 { 817 "HELP", 818 4, 819 0, 820 NULL, 821 at_help, 822 NULL, 823 NULL, 824 NULL, 825 }, 826 { 827 "DUMP", 828 8, 829 0, 830 NULL, 831 at_get_dump, 832 NULL, 833 NULL, 834 NULL, 835 }, 836 { 837 "RST", 838 8, 839 0, 840 rst_syntax, 841 at_exe_reset_cmd, 842 (at_set_func_t)at_set_reset_cmd, 843 NULL, 844 NULL, 845 }, 846 { 847 "DATE", 848 8, 849 0, 850 date_syntax, 851 at_date_cmd, 852 (at_set_func_t)at_date_set_cmd, 853 NULL, 854 NULL, 855 }, 856 { 857 "MFGFLAG", 858 9, 859 0, 860 NULL, 861 cmd_write_mfg_flag, 862 (at_set_func_t)NULL, 863 NULL, 864 NULL, 865 }, 866 { 867 "DIEID", 868 6, 869 0, 870 NULL, 871 cmd_get_dieid, 872 (at_set_func_t)NULL, 873 NULL, 874 NULL, 875 }, 876 { 877 "CUSTOMEFUSE", 878 7, 879 0, 880 customer_rsvd_efuse_syntax, 881 NULL, 882 (at_set_func_t)cmd_set_customer_rsvd_efuse, 883 cmd_get_customer_rsvd_efuse, 884 NULL, 885 }, 886 { 887 "JTAG", 888 7, 889 0, 890 NULL, 891 cmd_disable_ssi_jtag, 892 (at_set_func_t)NULL, 893 cmd_get_ssi_jtag_status, 894 NULL, 895 }, 896 { 897 "PUBKEY", 898 7, 899 0, 900 pubkey_syntax, 901 NULL, 902 (at_set_func_t)cmd_set_hash_root_public_key, 903 cmd_get_hash_root_public_key, 904 NULL, 905 }, 906 { 907 "SECVERIFY", 908 10, 909 0, 910 NULL, 911 cmd_sec_verify_enable, 912 (at_set_func_t)NULL, 913 cmd_get_sec_verify_status, 914 NULL, 915 }, 916 { 917 "FLASHREAD", 918 10, 919 0, 920 flashread_syntax, 921 NULL, 922 (at_set_func_t)plt_flash_read, 923 NULL, 924 NULL, 925 }, 926 { 927 "FLASHWRITE", 928 11, 929 0, 930 flashwrite_syntax, 931 NULL, 932 (at_set_func_t)plt_flash_write, 933 NULL, 934 NULL, 935 }, 936 { 937 "LICENSE", 938 2, 939 0, 940 license_syntax, 941 NULL, 942 (at_set_func_t)save_license, 943 NULL, 944 NULL, 945 }, 946 }; 947 948 #endif /* AT_PLT_CMD_AT_CMD_TALBE_H */ 949 950