gets
 
Syntax

void gets(char *stringPointer);

Description


gets 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 be replaced by a 0 (null) character will be returned in the array.

gets is implelmented using getline, with maxLen limiting the number of characters copied into stringPointer.  If that limit is hit, then the routine will return.  This limit is set to 256, and may be changed by the user in the coridium.h file

gets will wait for input indefinately.

Example

 while (1) {
    puts("enter option:");
    gets(instring);
    inval = atoi(instring);
  
    switch (inval) {
       case 1:

 
See also