# HG changeset patch # User Mychaela Falconia # Date 1549496057 0 # Node ID ea4af6f4104d4c77be5cd6e494486370461b6b04 # Parent d43dadd913834663c4d24504e3be0dcfdb3a4144 cst_exts.c: changes from Magnetite: allow BIG_SMALL_SLEEP and formatting fixes diff -r d43dadd91383 -r ea4af6f4104d src/cs/services/cst/cst_exts.c --- a/src/cs/services/cst/cst_exts.c Wed Feb 06 23:28:49 2019 +0000 +++ b/src/cs/services/cst/cst_exts.c Wed Feb 06 23:34:17 2019 +0000 @@ -615,34 +615,34 @@ switch (*cmd) { case 'e': - case 'E': + case 'E': /* 's''e' already detected => assume the command is at%ser. */ - { - cmd += 3; /* Discard the following characters */ - *cmdLen -= 9; - if (SER_WriteConfig (cmd, (BOOL) (*(cmd + 3) - '0'))) - return( AT_CMPL ); - else - return( AT_FAIL ); - } + { + cmd += 3; /* Discard the following characters */ + *cmdLen -= 9; + if (SER_WriteConfig (cmd, (BOOL) (*(cmd + 3) - '0'))) + return( AT_CMPL ); + else + return( AT_FAIL ); + } case 'w': - case 'W': + case 'W': /* 's''w' already detected => assume the command is at%switch. */ - { - *cmdLen -= 7; - if (SER_ImmediateSwitch()) - return( AT_CMPL ); - else - return( AT_FAIL ); - } + { + *cmdLen -= 7; + if (SER_ImmediateSwitch()) + return( AT_CMPL ); + else + return( AT_FAIL ); + } case 'l': - case 'L': + case 'L': /* 's''l' already detected => assume the command is at%sleep. */ - { - cmd += 5; /* Discard the following characters */ - *cmdLen -= 8; + { + cmd += 5; /* Discard the following characters */ + *cmdLen -= 8; /* * Checks if the parameter is valid: * 0 -> NO_SLEEP @@ -650,22 +650,23 @@ * 2 -> BIG_SLEEP * 3 -> DEEP_SLEEP * 4 -> ALL_SLEEP + * 5 -> BIG_SMALL_SLEEP */ - if (((*cmd - '0') >= 0) && ((*cmd - '0') <= 4)) + if (((*cmd - '0') >= 0) && ((*cmd - '0') <= 5)) { power_down_config ((UBYTE) (*cmd - '0'), UWIRE_CLK_CUT); - return( AT_CMPL ); + return( AT_CMPL ); } - else + else return( AT_FAIL ); - } + } default: *cmdLen -= 2; return ( AT_FAIL ); - } + } } case 'H': @@ -739,7 +740,7 @@ out[0] = 22; memcpy (&out[1], "Performing Audio Tests", 22); out [23] = (CHAR) 0xff; - } + } else { if (!strncmp(cmd, "R", 1) || !strncmp(cmd, "r", 1)) @@ -751,7 +752,7 @@ } else return( AT_FAIL ); - } + } return( AT_CMPL ); #endif default: