-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from JF002/develop
Export the version of the bootloader to the application.
- Loading branch information
Showing
9 changed files
with
47 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#ifndef PINETIME_RUST_MYNEWT_VERSION_H | ||
#define PINETIME_RUST_MYNEWT_VERSION_H | ||
|
||
#define PINETIME_BOOTLOADER_VERSION_MAJOR 1u | ||
#define PINETIME_BOOTLOADER_VERSION_MINOR 0u | ||
#define PINETIME_BOOTLOADER_VERSION_PATCH 0u | ||
#define PINETIME_BOOTLOADER_VERSION ((PINETIME_BOOTLOADER_VERSION_MAJOR << 16u) | (PINETIME_BOOTLOADER_VERSION_MINOR << 8u) | (PINETIME_BOOTLOADER_VERSION_PATCH)) | ||
|
||
void pinetime_set_version(void); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file renamed
BIN
+2.66 KB
libs/pinetime_boot/src/version-0.0.1.xcf → libs/pinetime_boot/src/version-1.0.0.xcf
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#include "pinetime_boot/version.h" | ||
#include <hal/nrf_timer.h> | ||
|
||
void pinetime_set_version(void) { | ||
/* Store the bootloader version into NRF_TIMER2->CC[0] | ||
* The application needs to read this register before using TIMER2 | ||
* This is how adafruit-bootloader exports its version to the application */ | ||
NRF_TIMER2->CC[0] = PINETIME_BOOTLOADER_VERSION; | ||
} |