SuperHouse / esp-open-rtos

Open source FreeRTOS-based ESP8266 software framework
BSD 3-Clause "New" or "Revised" License
1.52k stars 491 forks source link

Add UART REPL library and example #603

Open alhirzel opened 6 years ago

alhirzel commented 6 years ago

I wrote up a quick ANSI parser that works via serial. It is useful to accept basic commands and saves having to parse the backspace/delete keys and the arrow keys. Future extension is likely depending on community feedback.

Two problems, I use fixed-length buffers and everything is on the stack. Would appreciate guidelines on how to better structure this. Also, one day it would be good to parse hotkeys (such as function keys); handling these would require two callbacks. I could use community feedback on this as well.