Add custom impl of output; drop ev3-api

This commit is contained in:
Michal Moskal
2017-07-11 16:58:51 +02:00
parent 02e45762b4
commit 340d5e5cbf
5 changed files with 35 additions and 14 deletions

View File

@ -1,5 +1,5 @@
#include "pxt.h"
#include "ev3.h"
#include "ev3const.h"
namespace output {
@ -12,18 +12,11 @@ Buffer createBuffer(int size) {
return mkBuffer(NULL, size);
}
extern "C" int WriteToPWMDevice(char *bytes, int num_bytes);
//%
void writePWM(Buffer buf) {
WriteToPWMDevice((char *)buf->data, buf->length);
}
}
namespace pxt {
void target_init() {
OutputInit();
}
}