#include <n4.h>
|
void | setup (const char *code=0, Stream &io=Serial, U8 ucase=0) |
| placeholder for extra setup More...
|
|
void | exec () |
| nanoForth execute one line of command input More...
|
|
◆ setup()
void NanoForth::setup |
( |
const char * |
code = 0 , |
|
|
Stream & |
io = Serial , |
|
|
U8 |
ucase = 0 |
|
) |
| |
placeholder for extra setup
n4 VM init proxy
- Parameters
-
code | preload Forth code |
io | iostream which can be redirected to SoftwareSerial |
ucase | case sensitiveness (default: sensitive) |
◆ exec()
nanoForth execute one line of command input
n4 execute one line of commands from input buffer
- step through commands from input buffer
- give some cycles to user defined tasks
◆ add_api()
void NanoForth::add_api |
( |
U16 |
i, |
|
|
void(*)() |
fp |
|
) |
| |
|
static |
add new (user defined) hardware task to linked-list
- Parameters
-
i | add the user function to NanoForth task manager index of function pointer slots |
fp | user function pointer to be added |
◆ yield()
void NanoForth::yield |
( |
| ) |
|
|
static |
nanoForth yield to user tasks
n4 yield, execute one round of user hardware tasks
Note:
- 0 isr, n4: 1 blinker - 17us/cycle
- service hardware interrupts
◆ wait()
void NanoForth::wait |
( |
U32 |
ms | ) |
|
|
static |
pause NanoForth thread for ms microseconds, yield to user tasks
aka Arduino delay(), yield to hardware context while waiting
◆ call_api()
void NanoForth::call_api |
( |
U16 |
id | ) |
|
|
static |
◆ api
FPTR NanoForth::api = { NULL } |
|
staticprivate |
C API function pointer slots.
The documentation for this class was generated from the following files: