Fix typo in onPulse; hook up createBuffer
This commit is contained in:
parent
e8a3a2f676
commit
31002ae1a8
@ -1,5 +1,6 @@
|
|||||||
#include "ksbit.h"
|
#include "ksbit.h"
|
||||||
|
|
||||||
|
// keep in sync with github/pxt/pxtsim/libgeneric.ts
|
||||||
enum class NumberFormat {
|
enum class NumberFormat {
|
||||||
Int8LE = 1,
|
Int8LE = 1,
|
||||||
UInt8LE,
|
UInt8LE,
|
||||||
|
@ -514,13 +514,17 @@ namespace pxsim.radio {
|
|||||||
}
|
}
|
||||||
|
|
||||||
namespace pxsim.pins {
|
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 {
|
export function pulseDuration(): number {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function createBuffer(sz:number) {
|
||||||
|
return pxsim.BufferMethods.createBuffer(sz)
|
||||||
|
}
|
||||||
|
|
||||||
export function digitalReadPin(pinId: number): number {
|
export function digitalReadPin(pinId: number): number {
|
||||||
let pin = getPin(pinId);
|
let pin = getPin(pinId);
|
||||||
if (!pin) return;
|
if (!pin) return;
|
||||||
|
Loading…
Reference in New Issue
Block a user