FreeCalypso > hg > fc-magnetite
comparison src/cs/services/cst/cst_exts.c @ 570:855b3c5bb4b5
.../cst/cst_exts.c: tab indentation fixes
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 12 Jan 2019 22:53:46 +0000 |
parents | a90812ea82c9 |
children | b24d42baa30d |
comparison
equal
deleted
inserted
replaced
569:29c0be5a1962 | 570:855b3c5bb4b5 |
---|---|
613 cmd++; | 613 cmd++; |
614 | 614 |
615 switch (*cmd) { | 615 switch (*cmd) { |
616 | 616 |
617 case 'e': | 617 case 'e': |
618 case 'E': | 618 case 'E': |
619 /* 's''e' already detected => assume the command is at%ser. */ | 619 /* 's''e' already detected => assume the command is at%ser. */ |
620 { | 620 { |
621 cmd += 3; /* Discard the following characters */ | 621 cmd += 3; /* Discard the following characters */ |
622 *cmdLen -= 9; | 622 *cmdLen -= 9; |
623 if (SER_WriteConfig (cmd, (BOOL) (*(cmd + 3) - '0'))) | 623 if (SER_WriteConfig (cmd, (BOOL) (*(cmd + 3) - '0'))) |
624 return( AT_CMPL ); | 624 return( AT_CMPL ); |
625 else | 625 else |
626 return( AT_FAIL ); | 626 return( AT_FAIL ); |
627 } | 627 } |
628 | 628 |
629 case 'w': | 629 case 'w': |
630 case 'W': | 630 case 'W': |
631 /* 's''w' already detected => assume the command is at%switch. */ | 631 /* 's''w' already detected => assume the command is at%switch. */ |
632 { | 632 { |
633 *cmdLen -= 7; | 633 *cmdLen -= 7; |
634 if (SER_ImmediateSwitch()) | 634 if (SER_ImmediateSwitch()) |
635 return( AT_CMPL ); | 635 return( AT_CMPL ); |
636 else | 636 else |
637 return( AT_FAIL ); | 637 return( AT_FAIL ); |
638 } | 638 } |
639 | 639 |
640 case 'l': | 640 case 'l': |
641 case 'L': | 641 case 'L': |
642 /* 's''l' already detected => assume the command is at%sleep. */ | 642 /* 's''l' already detected => assume the command is at%sleep. */ |
643 { | 643 { |
644 cmd += 5; /* Discard the following characters */ | 644 cmd += 5; /* Discard the following characters */ |
645 *cmdLen -= 8; | 645 *cmdLen -= 8; |
646 /* | 646 /* |
647 * Checks if the parameter is valid: | 647 * Checks if the parameter is valid: |
648 * 0 -> NO_SLEEP | 648 * 0 -> NO_SLEEP |
649 * 1 -> SMALL_SLEEP | 649 * 1 -> SMALL_SLEEP |
650 * 2 -> BIG_SLEEP | 650 * 2 -> BIG_SLEEP |
651 * 3 -> DEEP_SLEEP | 651 * 3 -> DEEP_SLEEP |
652 * 4 -> ALL_SLEEP | 652 * 4 -> ALL_SLEEP |
653 */ | 653 */ |
654 | 654 |
655 if (((*cmd - '0') >= 0) && ((*cmd - '0') <= 4)) | 655 if (((*cmd - '0') >= 0) && ((*cmd - '0') <= 4)) |
656 { | 656 { |
657 power_down_config ((UBYTE) (*cmd - '0'), UWIRE_CLK_CUT); | 657 power_down_config ((UBYTE) (*cmd - '0'), UWIRE_CLK_CUT); |
658 return( AT_CMPL ); | 658 return( AT_CMPL ); |
659 } | 659 } |
660 else | 660 else |
661 return( AT_FAIL ); | 661 return( AT_FAIL ); |
662 } | 662 } |
663 | 663 |
664 default: | 664 default: |
665 *cmdLen -= 2; | 665 *cmdLen -= 2; |
666 return ( AT_FAIL ); | 666 return ( AT_FAIL ); |
667 | 667 |
668 } | 668 } |
669 } | 669 } |
670 | 670 |
671 case 'H': | 671 case 'H': |
672 *cmdLen -= 2; | 672 *cmdLen -= 2; |
673 | 673 |
737 { | 737 { |
738 //audio_test_misc(); | 738 //audio_test_misc(); |
739 out[0] = 22; | 739 out[0] = 22; |
740 memcpy (&out[1], "Performing Audio Tests", 22); | 740 memcpy (&out[1], "Performing Audio Tests", 22); |
741 out [23] = (CHAR) 0xff; | 741 out [23] = (CHAR) 0xff; |
742 } | 742 } |
743 else | 743 else |
744 { | 744 { |
745 if (!strncmp(cmd, "R", 1) || !strncmp(cmd, "r", 1)) | 745 if (!strncmp(cmd, "R", 1) || !strncmp(cmd, "r", 1)) |
746 { | 746 { |
747 //rtc_test_misc(); | 747 //rtc_test_misc(); |
749 memcpy (&out[1], "Performing RTC Tests", 20); | 749 memcpy (&out[1], "Performing RTC Tests", 20); |
750 out [21] = (CHAR) 0xff; | 750 out [21] = (CHAR) 0xff; |
751 } | 751 } |
752 else | 752 else |
753 return( AT_FAIL ); | 753 return( AT_FAIL ); |
754 } | 754 } |
755 return( AT_CMPL ); | 755 return( AT_CMPL ); |
756 #endif | 756 #endif |
757 default: | 757 default: |
758 *cmdLen -= 2; | 758 *cmdLen -= 2; |
759 return ( AT_FAIL ); | 759 return ( AT_FAIL ); |