Add Protothreads.

Protothreads are a extremely lightweight, stackless threads that provides a blocking context on top of an event-driven system, without the overhead of per-thread stacks.
The purpose of protothreads is to implement sequential flow of control without using complex state machines or full multi-threading.

Signed-off-by: cctsao1008 <chiacheng.tsao@gmail.com>
Add chfms

hierarchical state machine library in C.

A hierarchical FSM library in C. You describe the FSM with C struct(with function pointers as members) and provide the callback implementations. The library implements state movement and message(event) dispatch mechanisms.
flash updater cannot work!!

Signed-off-by: cctsao1008 <chiacheng.tsao@gmail.com>