pxt-calliope/libs/microbit/control.ts

19 lines
501 B
TypeScript
Raw Normal View History

2016-03-26 05:13:09 +01:00
//% weight=1 color="#333333"
2016-03-10 23:01:04 +01:00
namespace control {
2016-03-30 02:11:17 +02:00
2016-03-10 23:01:04 +01:00
/**
2016-03-30 02:11:17 +02:00
* Returns the value of a C++ runtime constant
2016-03-10 23:01:04 +01:00
*/
2016-03-30 02:11:17 +02:00
//% weight=19 weight=19 blockId="control_event_source" block="%id"
export function eventSource(id: EventBusSource) : number {
return id;
}
2016-03-28 09:23:00 +02:00
/**
2016-03-30 02:11:17 +02:00
* Returns the value of a C++ runtime constant
2016-03-28 09:23:00 +02:00
*/
2016-03-30 02:11:17 +02:00
//% weight=19 weight=19 blockId="control_event_value" block="%id"
export function eventValue(id: EventBusValue) : number {
return id;
}
2016-03-10 23:01:04 +01:00
}