+/**
+ * \brief reads a line or max n characters from the console and echos the characters back
+ * Writes characters from the console into the supplied buffer until a '\r'
+ * character is received or until n character a read (whatever happens first).
+ * The string will always be terminated by a '\0' character, so the buffer
+ * should have at least a size of n+1.
+ */
+uint8_t cli_getsn_cecho(char* s, uint32_t n){
+ uint8_t echo_backup,r ;
+ echo_backup = cli_echo;
+ cli_echo = 1;
+ r = cli_getsn(s, n);
+ cli_echo = echo_backup;
+ return r;
+}
+