-
Notifications
You must be signed in to change notification settings - Fork 191
Add initial DatanoiseTV PicoADK Board Support #169
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
Open
DatanoiseTV
wants to merge
9
commits into
sensorium:master
Choose a base branch
from
DatanoiseTV:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
577ed48
Update Audio Config for current arduino-pico SDK.
DatanoiseTV ec58a32
Add initial Datanoise PicoADK board support.
DatanoiseTV 415f446
Merge branch 'sensorium:master' into master
DatanoiseTV 3c4dcb5
Add random implmentation for RP2040 using the rosc.
DatanoiseTV a4d963c
Merge branch 'master' of github.com:DatanoiseTV/Mozzi
DatanoiseTV 8d93779
Increase buffer size to avoid undderuns with more complex patches.
DatanoiseTV f733579
Increase sample rate to 32768Hz for RP2040.
DatanoiseTV eb3d457
Review after PR comments.
DatanoiseTV 49ee101
Remove warning.
DatanoiseTV File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
|
@@ -9,6 +9,10 @@ extern STM32ADC adc; | |
#include <esp8266_peri.h> | ||
#endif | ||
|
||
#if IS_RP2040() | ||
#include "hardware/structs/rosc.h" | ||
#endif | ||
|
||
// moved these out of xorshift96() so xorshift96() can be reseeded manually | ||
static unsigned long x=132456789, y=362436069, z=521288629; | ||
// static unsigned long x= analogRead(A0)+123456789; | ||
|
@@ -144,6 +148,16 @@ void randSeed() { | |
x = RANDOM_REG32; | ||
y = random (0xFFFFFFFF) ^ RANDOM_REG32; | ||
z = random (0xFFFFFFFF) ^ RANDOM_REG32; | ||
#elif IS_RP2040() | ||
uint32_t rand_seed; | ||
for (int i = 0; i < 32; i++) | ||
{ | ||
bool randomBit = rosc_hw->randombit; | ||
rand_seed = rand_seed | (randomBit << i); | ||
} | ||
x = random (rand_seed); | ||
y = random (rand_seed); | ||
z = random (rand_seed); | ||
#else | ||
Comment on lines
+151
to
161
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Haven't tested but look good to me. |
||
#warning Automatic random seeding not implemented on this platform | ||
#endif | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think this is needed as the RP2040 is not AVR so the test on line 35 will be false and the AUDIO_RATE was already at 32768.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you checked this?