#include <cirbuf.h>
#include "rdline.h"
-static void rdline_puts_P(struct rdline * rdl, const prog_char * buf);
+static void rdline_puts_P(struct rdline * rdl, const char * buf);
static void rdline_miniprintf_P(struct rdline * rdl,
- const prog_char * buf, uint8_t val);
+ const char * buf, uint8_t val);
#ifdef CONFIG_MODULE_RDLINE_HISTORY
static void rdline_remove_old_history_item(struct rdline * rdl);
rdl->validate = validate;
rdl->complete = complete;
rdl->write_char = write_char;
- rdl->status = RDLINE_INIT;
+ rdl->status = RDLINE_STOPPED;
#ifdef CONFIG_MODULE_RDLINE_HISTORY
cirbuf_init(&rdl->history, rdl->history_buf, 0, RDLINE_HISTORY_BUF_SIZE);
#endif /* CONFIG_MODULE_RDLINE_HISTORY */
void
rdline_stop(struct rdline * rdl)
{
- rdl->status = RDLINE_INIT;
+ rdl->status = RDLINE_STOPPED;
}
void
case KEY_RETURN:
case KEY_RETURN2:
rdline_get_buffer(rdl);
- rdl->status = RDLINE_INIT;
rdline_puts_P(rdl, PSTR("\r\n"));
#ifdef CONFIG_MODULE_RDLINE_HISTORY
if (rdl->history_cur_line != -1)
/* STATIC USEFUL FUNCS */
static void
-rdline_puts_P(struct rdline * rdl, const prog_char * buf)
+rdline_puts_P(struct rdline * rdl, const char * buf)
{
char c;
while ( (c=pgm_read_byte(buf++)) != '\0' ) {
/* a very very basic printf with one arg and one format 'u' */
static void
-rdline_miniprintf_P(struct rdline * rdl, const prog_char * buf, uint8_t val)
+rdline_miniprintf_P(struct rdline * rdl, const char * buf, uint8_t val)
{
char c, started=0, div=100;