-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat/platform_random' into ci/platform_mods
- Loading branch information
Showing
3 changed files
with
26 additions
and
7 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
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 |
---|---|---|
@@ -1,20 +1,19 @@ | ||
/** | ||
* @file util.cpp | ||
* @author Emily Thorpe ([email protected]) | ||
* @brief | ||
* @brief | ||
* @version 0.1 | ||
* @date 2023-07-26 | ||
* | ||
* | ||
* @copyright Copyright (c) 2023 | ||
* | ||
* | ||
*/ | ||
|
||
#include "util.hpp" | ||
|
||
#include "Particle.h" | ||
#include "cli/conio.hpp" | ||
#include "consts.hpp" | ||
|
||
#include "Particle.h" | ||
#include "product.hpp" | ||
|
||
/** | ||
* \brief A macro that stores the the size of each line of output as a constant 16 bytes | ||
|
@@ -62,4 +61,13 @@ void hexDump(const void *memoryLocation, size_t buflen) | |
SF_OSAL_printf(" |%s|" __NL__, (const char*)byte_buffer); | ||
} | ||
SF_OSAL_printf("%08x" __NL__, buffer_idx); | ||
} | ||
|
||
int SF::utils::random(int min, int max) | ||
{ | ||
#if SF_PLATFORM == SF_PLATFORM_PARTICLE | ||
return ::random(min, max); | ||
#elif SF_PLATFORM == SF_PLATFORM_GCC | ||
#error | ||
#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