getStr
 
Syntax

void getStr(char *stringPointer, int maxLen);

Description


getStr will accept a string from the USB port on the ARMmite or SIN on the ARMexpress.

The string will be saved into the stringPointer char array.  A CR (carriage return) will terminate the string and a 0 (null) character will be added to the array and the routine will return.

maxLen will limit the number of characters copied into stringPointer.  If that limit is hit, then the routine will return.

getStr will wait for input indefinately.

Example

 while (1) {
    printStr("enter option:");
    getStr(instring, 100);
    inval = str2dec(instring);
  
    switch (inval) {
       case 1:

 
See also