Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup build with codal-microbit-v2 #1372

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions libs/core---nrf52/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@
#include "Timer.h"
#include "MultiButton.h"

#if defined(MICROBIT_AVAILABLE)
#define PXT_USE_MICROBIT 1
#endif

#ifdef PXT_USE_MICROBIT
#include "MicroBitIO.h"
#endif

#define PAGE_SIZE 4096
#define MIC_DEVICE NRF52PDM

Expand All @@ -34,7 +42,10 @@

#define IMAGE_BITS 4

typedef uint8_t PinName;
#ifndef PXT_USE_MICROBIT
// The /* */ in front is so that this is not copied to pointers.cpp
/* */ typedef uint8_t PinName;
#endif

#define DEFAULT_NEOPIXEL_PIN P0_0

Expand All @@ -59,7 +70,7 @@ typedef uint8_t PinName;
#define LIGHTSENSOR_LOW_THRESHOLD 128
#define LIGHTSENSOR_HIGH_THRESHOLD 896


#ifndef PXT_USE_MICROBIT
#define P0_0 0
#define P0_1 1
#define P0_2 2
Expand Down Expand Up @@ -124,5 +135,6 @@ typedef uint8_t PinName;
#define P1_29 61
#define P1_30 62
#define P1_31 63
#endif

#endif