From ce85907019634d8e81383974f4c72303e4cbf0a6 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Tue, 29 Nov 2016 21:55:37 -0800 Subject: [PATCH] removing ksbit.h file --- 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 | 12 ------------ libs/core/led.cpp | 2 +- libs/core/motors.cpp | 2 +- libs/core/music.cpp | 2 +- libs/core/pins.cpp | 2 +- libs/core/pxt.h | 7 +++++++ libs/core/pxt.json | 1 - libs/core/serial.cpp | 2 +- 14 files changed, 18 insertions(+), 24 deletions(-) delete mode 100644 libs/core/ksbit.h diff --git a/libs/core/basic.cpp b/libs/core/basic.cpp index d4306513..4340de27 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 972779d9..3da2d41e 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 909fb196..0e68ea36 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 40cb014b..dbb868a0 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 3e0fc943..c4ff5086 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 f1d3f4b5..00000000 --- a/libs/core/ksbit.h +++ /dev/null @@ -1,12 +0,0 @@ -#include "pxt.h" -#include "ManagedBuffer.h" - -using namespace pxt; -MicroBitPin *getPin(int id); -typedef ImageData* Image; -typedef BufferData* Buffer; - -namespace pxt { - uint32_t programSize(); - uint32_t afterProgramPage(); -} diff --git a/libs/core/led.cpp b/libs/core/led.cpp index c1c215b8..2d5e9a03 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/motors.cpp b/libs/core/motors.cpp index a70936bd..40c2058d 100644 --- a/libs/core/motors.cpp +++ b/libs/core/motors.cpp @@ -1,4 +1,4 @@ -#include "ksbit.h" +#include "pxt.h" enum MotorCommand { //% block=coast diff --git a/libs/core/music.cpp b/libs/core/music.cpp index 867e4a23..5154b9b4 100644 --- a/libs/core/music.cpp +++ b/libs/core/music.cpp @@ -1,4 +1,4 @@ -#include "ksbit.h" +#include "pxt.h" namespace music { /** diff --git a/libs/core/pins.cpp b/libs/core/pins.cpp index 38bd5c11..3a67010f 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, // edge connector 0 diff --git a/libs/core/pxt.h b/libs/core/pxt.h index 72942b63..5ecbd082 100644 --- a/libs/core/pxt.h +++ b/libs/core/pxt.h @@ -62,6 +62,8 @@ namespace pxt { uint32_t *allocate(uint16_t sz); int templateHash(); int programHash(); + uint32_t programSize(); + uint32_t afterProgramPage(); int getNumGlobals(); RefRecord* mkClassInstance(int vtableOffset); @@ -294,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 247344c5..0be59147 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 ac44a6eb..6b8052c8 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,