The Squirrel interpreter for FRDM-K64F, extended with a set of classes that provide access to the mbed functionality (currently DigitalIn, DigitalInOut, DigitalOut, InterruptIn, PwmOut, Ticker, Timeout, Timer).
Dependencies: SQUIRREL3 mbed sqbind-0_99
The Squirrel interpreter for FRDM-K64F.
NOTE: Currently of POC quality.
See http://www.squirrel-lang.org/ for information about the Squirrel language.
Currently the following (a subset of their functionality) mbed classes are available from within Squirrel:
- DigitalIn
- DigitalOut
- DigitalInOut
- PwmOut
- Ticker
- Timeout
- Timer
In addition, InterruptIn is supported, but interrupts are noted when they occur, but only delivered from the main loop of the interpreter.
See also README.txt in the root of the project.
Diff: sqmbed/src/common.cpp
- Revision:
- 0:6f55c7651ccc
- Child:
- 1:540008bb92a2
diff -r 000000000000 -r 6f55c7651ccc sqmbed/src/common.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sqmbed/src/common.cpp Tue Dec 16 12:54:53 2014 +0000 @@ -0,0 +1,72 @@ +/* + @License@ +*/ + +#include <sqmbed/common.h> + +namespace SqMbed +{ + +const char* toString(SQObjectType t) +{ + switch (t) { + case OT_NULL: + return "OT_NULL"; + + case OT_INTEGER: + return "OT_INTEGER"; + + case OT_FLOAT: + return "OT_FLOAT"; + + case OT_BOOL: + return "OT_BOOL"; + + case OT_STRING: + return "OT_STRING"; + + case OT_TABLE: + return "OT_TABLE"; + + case OT_ARRAY: + return "OT_ARRAY"; + + case OT_USERDATA: + return "OT_USERDATA"; + + case OT_CLOSURE: + return "OT_CLOSURE"; + + case OT_NATIVECLOSURE: + return "OT_NATIVECLOSURE"; + + case OT_GENERATOR: + return "OT_GENERATOR"; + + case OT_USERPOINTER: + return "OT_USERPOINTER"; + + case OT_THREAD: + return "OT_THREAD"; + + case OT_FUNCPROTO: + return "OT_FUNCPROTO"; + + case OT_CLASS: + return "OT_CLASS"; + + case OT_INSTANCE: + return "OT_INSTANCE"; + + case OT_WEAKREF: + return "OT_WEAKREF"; + + case OT_OUTER: + return "OT_OUTER"; + + default: + return "OT_UNKNOWN"; + } +} + +}