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

Populate MICROBIT_DAL_VERSION and add microbit_dal_version(). #434

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
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
11 changes: 7 additions & 4 deletions inc/MicroBitConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -283,12 +283,15 @@
#endif

// Versioning options.
// We use semantic versioning (http://semver.org/) to identify differnet versions of the micro:bit runtime.
// Where possible we use yotta (an ARM mbed build tool) to help us track versions.
// if this isn't available, it can be defined manually as a configuration option.
// We use semantic versioning (http://semver.org/) to identify different versions of the micro:bit runtime.
// If this isn't available, it can be defined manually as a configuration option.
//
#ifndef MICROBIT_DAL_VERSION
#define MICROBIT_DAL_VERSION "unknown"
#ifdef DEVICE_DAL_VERSION
#define MICROBIT_DAL_VERSION DEVICE_DAL_VERSION
#else
#define MICROBIT_DAL_VERSION "unknown"
#endif
#endif

// Allow USB serial events to wake the board from deep sleep.
Expand Down
2 changes: 1 addition & 1 deletion inc/MicroBitDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ namespace codal
void microbit_reset();

/**
* Determine the version of microbit-dal currently running.
* For DAL compatibility, determine the version of DAL/CODAL currently running.
* @return a pointer to a character buffer containing a representation of the semantic version number.
*/
const char * microbit_dal_version();
Expand Down
9 changes: 9 additions & 0 deletions source/MicroBitDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,15 @@ __NO_RETURN void microbit_reset()
for (;;);
}

/**
* For DAL compatibility, determine the version of DAL/CODAL currently running.
* @return a pointer to a character buffer containing a representation of the semantic version number.
*/
const char * microbit_dal_version()
{
return MICROBIT_DAL_VERSION;
}

/**
* Seed the random number generator (RNG).
*
Expand Down
2 changes: 1 addition & 1 deletion target-locked.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"generate_hex": true,
"libraries": [
{
"branch": "992c0b11a0eb2a1edca9c2f76821f89a99a3acec",
"branch": "c46d62943bc05a1b8296663ac4c643475a3e8a4c",
"name": "codal-core",
"type": "git",
"url": "https://github.com/lancaster-university/codal-core"
Expand Down
Loading