changeset 151:ea4af6f4104d

cst_exts.c: changes from Magnetite: allow BIG_SMALL_SLEEP and formatting fixes
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 06 Feb 2019 23:34:17 +0000
parents d43dadd91383
children d3668a47b969
files src/cs/services/cst/cst_exts.c
diffstat 1 files changed, 29 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- 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: