Add missing control stuff
This commit is contained in:
parent
bd09754466
commit
5d40750542
@ -157,7 +157,6 @@ namespace control {
|
|||||||
//% weight=20 blockGap=8 blockId="control_on_event" block="on event|from %src=control_event_source|with value %value=control_event_value"
|
//% weight=20 blockGap=8 blockId="control_on_event" block="on event|from %src=control_event_source|with value %value=control_event_value"
|
||||||
//% blockExternalInputs=1 blockStatement=1
|
//% blockExternalInputs=1 blockStatement=1
|
||||||
void onEvent(int src, int value, Action handler) {
|
void onEvent(int src, int value, Action handler) {
|
||||||
// not exposed yet
|
registerWithDal(src, value, handler);
|
||||||
// bitvm::registerWithDal(src, value, handler);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -221,6 +221,15 @@ namespace ks.rt.control {
|
|||||||
export function reset() {
|
export function reset() {
|
||||||
U.userError("reset not implemented in simulator yet")
|
U.userError("reset not implemented in simulator yet")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function onEvent(id: number, evid: number, handler: RefAction) {
|
||||||
|
kindscript.registerWithDal(id, evid, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function raiseEvent(id: number, evid: number, mode: number) {
|
||||||
|
// TODO mode?
|
||||||
|
board().bus.queue(id, evid)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace ks.rt.kindscript {
|
namespace ks.rt.kindscript {
|
||||||
|
Loading…
Reference in New Issue
Block a user