1
0
Fork 0

Change microrl library configuration to be suitable for student labs

This commit is contained in:
Silver Kits 2016-11-21 10:28:23 +02:00
parent 6fa1c472b1
commit d6fdf0ac12
1 changed files with 9 additions and 9 deletions

View File

@ -27,24 +27,24 @@ Token is word separate by white space, for example 3 token line:
Define you prompt string here. You can use colors escape code, for highlight you prompt,
for example this prompt will green color (if you terminal supports color)*/
//#define _PROMPT_DEFAULT "\033[32mIRin >\033[0m " // green color
#define _PROMPT_DEFAULT "\033[32mIRin >\033[0m " // green color
//#define _PROMPT_DEFAULT "IRin > "
#define _PROMPT_DEFAULT ">"
/*
Define prompt text (without ESC sequence, only text) prompt length, it needs because if you use
ESC sequence, it's not possible detect only text length*/
#define _PROMPT_LEN 7
#define _PROMPT_LEN 1
/*Define it, if you wanna use completion functional, also set completion callback in you code,
now if user press TAB calls 'copmlitetion' callback. If you no need it, you can just set
NULL to callback ptr and do not use it, but for memory saving tune,
if you are not going to use it - disable this define.*/
#define _USE_COMPLETE
//#define _USE_COMPLETE
/*Define it, if you wanna use history. It s work's like bash history, and
set stored value to cmdline, if UP and DOWN key pressed. Using history add
memory consuming, depends from _RING_HISTORY_LEN parametr */
#define _USE_HISTORY
//#define _USE_HISTORY
/*
History ring buffer length, define static buffer size.
@ -52,12 +52,12 @@ For saving memory, each entered cmdline store to history in ring buffer,
so we can not say, how many line we can store, it depends from cmdline len,
but memory using more effective. We not prefer dinamic memory allocation for
small and embedded devices. Overhead is 2 char on each saved line*/
#define _RING_HISTORY_LEN 64
//#define _RING_HISTORY_LEN 64
/*
Enable Handling terminal ESC sequence. If disabling, then cursor arrow, HOME, END will not work,
use Ctrl+A(B,F,P,N,A,E,H,K,U,C) see README, but decrease code memory.*/
#define _USE_ESC_SEQ
//#define _USE_ESC_SEQ
/*
Use snprintf from you standard complier library, but it gives some overhead.
@ -69,18 +69,18 @@ Try to build with and without, and compare total code size for tune library.
/*
Enable 'interrupt signal' callback, if user press Ctrl+C */
#define _USE_CTLR_C
//#define _USE_CTLR_C
/*
Print prompt at 'microrl_init', if enable, prompt will print at startup,
otherwise first prompt will print after first press Enter in terminal
NOTE!: Enable it, if you call 'microrl_init' after your communication subsystem
already initialize and ready to print message */
#undef _ENABLE_INIT_PROMPT
#define _ENABLE_INIT_PROMPT
/*
New line symbol */
#define _ENDL_LF
#define _ENDL_CR
#if defined(_ENDL_CR)
#define ENDL "\r"