Skip to content

Commit

Permalink
Implement microbit_dal_version() and set MICROBIT_DAL_VERSION.
Browse files Browse the repository at this point in the history
  • Loading branch information
microbit-carlos committed Mar 11, 2024
1 parent 08ba1e7 commit cca0631
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion inc/MicroBitConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,11 @@
// 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
4 changes: 4 additions & 0 deletions source/MicroBitDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ __NO_RETURN void microbit_reset()
for (;;);
}

const char * microbit_dal_version() {
return MICROBIT_DAL_VERSION;
}

/**
* Seed the random number generator (RNG).
*
Expand Down

0 comments on commit cca0631

Please sign in to comment.