Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of TinyJS by
Diff: Mbed_Functions.cpp
- Revision:
- 7:40010b4dc51d
- Parent:
- 6:30b4122b0ee2
- Child:
- 8:819934a27c2d
--- a/Mbed_Functions.cpp Sun Jan 19 17:57:05 2014 +0000 +++ b/Mbed_Functions.cpp Sun Jan 19 18:08:47 2014 +0000 @@ -3,7 +3,7 @@ * Mbed_Functions.cpp * * Authored by Takehisa Oneta (ohneta@gmail.com) - * 17th Jan. 2014 + * 17th Jan. 2014 - */ #include "mbed.h" @@ -87,7 +87,7 @@ _mbed_interruptIn_tinyJS->execute(_mbed_interruptIn_callbackStrings[3]); } -void mbedSetInterrupt(CScriptVar *c, void *data) +void mbedInterruptIn(CScriptVar *c, void *data) { string pinNameString = c->getParameter("pinName")->getString(); PinName pinName = _mbedPinNameExchange(pinNameString); @@ -258,7 +258,7 @@ tinyJS->addNative("function mbed.AnalogIn(pinName)", mbedAnalogIn, 0); tinyJS->addNative("function mbed.AnalogOut(pinName, val)", mbedAnalogOut, 0); - tinyJS->addNative("function mbed.SetInterrupt(pinName, edge, mode, callback)", mbedSetInterrupt, tinyJS); + tinyJS->addNative("function mbed.interruptIn(pinName, edge, mode, callback)", mbedInterruptIn, tinyJS); //tinyJS->addNative("function mbed.RemoveInterrupt(pinName)", mbedRemoveInterrupt, tinyJS); tinyJS->addNative("function mbed.wait(s)", mbedWait, 0);