ADI console menu

Files at this revision

API Documentation at this revision

Comitter:
mbradley
Date:
Fri Mar 27 18:55:32 2020 +0000
Parent:
1:dcc17e5a913f
Commit message:
Removing flushf() as it is not required.

Changed in this revision

adi_console_menu.c Show annotated file Show diff for this revision Revisions of this file
diff -r dcc17e5a913f -r 6a97882f6144 adi_console_menu.c
--- a/adi_console_menu.c	Sat Feb 29 04:11:15 2020 +0000
+++ b/adi_console_menu.c	Fri Mar 27 18:55:32 2020 +0000
@@ -136,20 +136,6 @@
 	return (itemSelected);
 }
 
-
-/*!
- * @brief      Clears the standard input buffer (typically
- *             needed after scanf function)
- *
- * @details
- */
-static void flushf(void)
-{
-	// flush the standard input (i.e. clear the input buffer)
-	while((getchar()) != '\n');
-}
-
-
 /*!
  * @brief      Reads a decimal string from the user
  *
@@ -190,7 +176,6 @@
 		}
 	} while(loop);
 
-	flushf();
 	return atoi(buf);
 }
 
@@ -232,7 +217,6 @@
 		}
 	} while(loop);
 
-	flushf();
 	return strtol(buf, NULL, 16);
 }
 
@@ -277,7 +261,6 @@
 		}
 	} while (loop);
 
-	flushf();
 	return atof(buf);
 }