From 19fb5ecf01ddde10af87565908b4e9be7bdd53f8 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Tue, 29 Nov 2016 21:35:26 -0800 Subject: [PATCH] merging ksbit.h into pxt.h --- libs/core/basic.cpp | 2 +- libs/core/buffer.cpp | 2 +- libs/core/control.cpp | 2 +- libs/core/core.cpp | 2 +- libs/core/images.cpp | 2 +- libs/core/input.cpp | 2 +- libs/core/ksbit.h | 8 -------- libs/core/led.cpp | 2 +- libs/core/pins.cpp | 2 +- libs/core/pxt.h | 6 ++++++ libs/core/pxt.json | 1 - libs/core/serial.cpp | 2 +- 12 files changed, 15 insertions(+), 18 deletions(-) delete mode 100644 libs/core/ksbit.h diff --git a/libs/core/basic.cpp b/libs/core/basic.cpp index 44c577ba..8ee09b4a 100644 --- a/libs/core/basic.cpp +++ b/libs/core/basic.cpp @@ -1,4 +1,4 @@ -#include "ksbit.h" +#include "pxt.h" /** diff --git a/libs/core/buffer.cpp b/libs/core/buffer.cpp index b0ea48a2..1ccb5813 100644 --- a/libs/core/buffer.cpp +++ b/libs/core/buffer.cpp @@ -1,4 +1,4 @@ -#include "ksbit.h" +#include "pxt.h" // keep in sync with github/pxt/pxtsim/libgeneric.ts enum class NumberFormat { diff --git a/libs/core/control.cpp b/libs/core/control.cpp index 13f5543c..dbf50d5b 100644 --- a/libs/core/control.cpp +++ b/libs/core/control.cpp @@ -1,4 +1,4 @@ -#include "ksbit.h" +#include "pxt.h" /** * How to create the event. diff --git a/libs/core/core.cpp b/libs/core/core.cpp index 574b73f0..30a01639 100644 --- a/libs/core/core.cpp +++ b/libs/core/core.cpp @@ -1,4 +1,4 @@ -#include "ksbit.h" +#include "pxt.h" #include diff --git a/libs/core/images.cpp b/libs/core/images.cpp index d1e8bb28..15fa5fc1 100644 --- a/libs/core/images.cpp +++ b/libs/core/images.cpp @@ -1,4 +1,4 @@ -#include "ksbit.h" +#include "pxt.h" /** * Creation, manipulation and display of LED images. diff --git a/libs/core/input.cpp b/libs/core/input.cpp index 5e6a7f11..e1d366aa 100644 --- a/libs/core/input.cpp +++ b/libs/core/input.cpp @@ -1,4 +1,4 @@ -#include "ksbit.h" +#include "pxt.h" enum class Button { A = MICROBIT_ID_BUTTON_A, diff --git a/libs/core/ksbit.h b/libs/core/ksbit.h deleted file mode 100644 index e182bdee..00000000 --- a/libs/core/ksbit.h +++ /dev/null @@ -1,8 +0,0 @@ -#include "pxt.h" -#include "ManagedBuffer.h" - -using namespace pxt; -MicroBitPin *getPin(int id); -typedef ImageData* Image; -typedef BufferData* Buffer; - diff --git a/libs/core/led.cpp b/libs/core/led.cpp index 457dbf64..a0046c65 100644 --- a/libs/core/led.cpp +++ b/libs/core/led.cpp @@ -1,4 +1,4 @@ -#include "ksbit.h" +#include "pxt.h" enum class DisplayMode_ { //% block="black and white" diff --git a/libs/core/pins.cpp b/libs/core/pins.cpp index bdc7a9e1..c5c2aa94 100644 --- a/libs/core/pins.cpp +++ b/libs/core/pins.cpp @@ -1,4 +1,4 @@ -#include "ksbit.h" +#include "pxt.h" enum class DigitalPin { P0 = MICROBIT_ID_IO_P0, diff --git a/libs/core/pxt.h b/libs/core/pxt.h index 46c923ab..182b7621 100644 --- a/libs/core/pxt.h +++ b/libs/core/pxt.h @@ -9,6 +9,7 @@ #include "MicroBitImage.h" #include "ManagedString.h" #include "ManagedType.h" +#include "ManagedBuffer.h" #define printf(...) uBit.serial.printf(__VA_ARGS__) // #define printf(...) @@ -295,6 +296,11 @@ namespace pxt { }; } +using namespace pxt; +MicroBitPin *getPin(int id); +typedef ImageData* Image; +typedef BufferData* Buffer; + // The ARM Thumb generator in the JavaScript code is parsing // the hex file and looks for the magic numbers as present here. // diff --git a/libs/core/pxt.json b/libs/core/pxt.json index ff6099ae..b79d7634 100644 --- a/libs/core/pxt.json +++ b/libs/core/pxt.json @@ -12,7 +12,6 @@ "enums.d.ts", "shims.d.ts", "pxt-core.d.ts", - "ksbit.h", "core.cpp", "pxt-helpers.ts", "helpers.ts", diff --git a/libs/core/serial.cpp b/libs/core/serial.cpp index 95e7bf7e..cd89aa8b 100644 --- a/libs/core/serial.cpp +++ b/libs/core/serial.cpp @@ -1,4 +1,4 @@ -#include "ksbit.h" +#include "pxt.h" enum SerialPin { P0 = MICROBIT_ID_IO_P0,