Fix typo in onPulse; hook up createBuffer

This commit is contained in:
Michal Moskal 2016-06-25 19:17:43 +01:00
parent e8a3a2f676
commit 31002ae1a8
2 changed files with 6 additions and 1 deletions

View File

@ -1,5 +1,6 @@
#include "ksbit.h"
// keep in sync with github/pxt/pxtsim/libgeneric.ts
enum class NumberFormat {
Int8LE = 1,
UInt8LE,

View File

@ -514,13 +514,17 @@ namespace pxsim.radio {
}
namespace pxsim.pins {
export function onPulse(name: number, pulse: number, body: RefAction) {
export function onPulsed(name: number, pulse: number, body: RefAction) {
}
export function pulseDuration(): number {
return 0;
}
export function createBuffer(sz:number) {
return pxsim.BufferMethods.createBuffer(sz)
}
export function digitalReadPin(pinId: number): number {
let pin = getPin(pinId);
if (!pin) return;