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.

Committer:
jhnwkmn
Date:
Tue Dec 16 12:54:53 2014 +0000
Revision:
0:6f55c7651ccc
Child:
1:540008bb92a2
Added README.txt;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jhnwkmn 0:6f55c7651ccc 1 /*
jhnwkmn 0:6f55c7651ccc 2 @License@
jhnwkmn 0:6f55c7651ccc 3 */
jhnwkmn 0:6f55c7651ccc 4
jhnwkmn 0:6f55c7651ccc 5 #include <sqmbed/common.h>
jhnwkmn 0:6f55c7651ccc 6
jhnwkmn 0:6f55c7651ccc 7 namespace SqMbed
jhnwkmn 0:6f55c7651ccc 8 {
jhnwkmn 0:6f55c7651ccc 9
jhnwkmn 0:6f55c7651ccc 10 const char* toString(SQObjectType t)
jhnwkmn 0:6f55c7651ccc 11 {
jhnwkmn 0:6f55c7651ccc 12 switch (t) {
jhnwkmn 0:6f55c7651ccc 13 case OT_NULL:
jhnwkmn 0:6f55c7651ccc 14 return "OT_NULL";
jhnwkmn 0:6f55c7651ccc 15
jhnwkmn 0:6f55c7651ccc 16 case OT_INTEGER:
jhnwkmn 0:6f55c7651ccc 17 return "OT_INTEGER";
jhnwkmn 0:6f55c7651ccc 18
jhnwkmn 0:6f55c7651ccc 19 case OT_FLOAT:
jhnwkmn 0:6f55c7651ccc 20 return "OT_FLOAT";
jhnwkmn 0:6f55c7651ccc 21
jhnwkmn 0:6f55c7651ccc 22 case OT_BOOL:
jhnwkmn 0:6f55c7651ccc 23 return "OT_BOOL";
jhnwkmn 0:6f55c7651ccc 24
jhnwkmn 0:6f55c7651ccc 25 case OT_STRING:
jhnwkmn 0:6f55c7651ccc 26 return "OT_STRING";
jhnwkmn 0:6f55c7651ccc 27
jhnwkmn 0:6f55c7651ccc 28 case OT_TABLE:
jhnwkmn 0:6f55c7651ccc 29 return "OT_TABLE";
jhnwkmn 0:6f55c7651ccc 30
jhnwkmn 0:6f55c7651ccc 31 case OT_ARRAY:
jhnwkmn 0:6f55c7651ccc 32 return "OT_ARRAY";
jhnwkmn 0:6f55c7651ccc 33
jhnwkmn 0:6f55c7651ccc 34 case OT_USERDATA:
jhnwkmn 0:6f55c7651ccc 35 return "OT_USERDATA";
jhnwkmn 0:6f55c7651ccc 36
jhnwkmn 0:6f55c7651ccc 37 case OT_CLOSURE:
jhnwkmn 0:6f55c7651ccc 38 return "OT_CLOSURE";
jhnwkmn 0:6f55c7651ccc 39
jhnwkmn 0:6f55c7651ccc 40 case OT_NATIVECLOSURE:
jhnwkmn 0:6f55c7651ccc 41 return "OT_NATIVECLOSURE";
jhnwkmn 0:6f55c7651ccc 42
jhnwkmn 0:6f55c7651ccc 43 case OT_GENERATOR:
jhnwkmn 0:6f55c7651ccc 44 return "OT_GENERATOR";
jhnwkmn 0:6f55c7651ccc 45
jhnwkmn 0:6f55c7651ccc 46 case OT_USERPOINTER:
jhnwkmn 0:6f55c7651ccc 47 return "OT_USERPOINTER";
jhnwkmn 0:6f55c7651ccc 48
jhnwkmn 0:6f55c7651ccc 49 case OT_THREAD:
jhnwkmn 0:6f55c7651ccc 50 return "OT_THREAD";
jhnwkmn 0:6f55c7651ccc 51
jhnwkmn 0:6f55c7651ccc 52 case OT_FUNCPROTO:
jhnwkmn 0:6f55c7651ccc 53 return "OT_FUNCPROTO";
jhnwkmn 0:6f55c7651ccc 54
jhnwkmn 0:6f55c7651ccc 55 case OT_CLASS:
jhnwkmn 0:6f55c7651ccc 56 return "OT_CLASS";
jhnwkmn 0:6f55c7651ccc 57
jhnwkmn 0:6f55c7651ccc 58 case OT_INSTANCE:
jhnwkmn 0:6f55c7651ccc 59 return "OT_INSTANCE";
jhnwkmn 0:6f55c7651ccc 60
jhnwkmn 0:6f55c7651ccc 61 case OT_WEAKREF:
jhnwkmn 0:6f55c7651ccc 62 return "OT_WEAKREF";
jhnwkmn 0:6f55c7651ccc 63
jhnwkmn 0:6f55c7651ccc 64 case OT_OUTER:
jhnwkmn 0:6f55c7651ccc 65 return "OT_OUTER";
jhnwkmn 0:6f55c7651ccc 66
jhnwkmn 0:6f55c7651ccc 67 default:
jhnwkmn 0:6f55c7651ccc 68 return "OT_UNKNOWN";
jhnwkmn 0:6f55c7651ccc 69 }
jhnwkmn 0:6f55c7651ccc 70 }
jhnwkmn 0:6f55c7651ccc 71
jhnwkmn 0:6f55c7651ccc 72 }