-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Feature: I2S callback on DMA read #4205
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
Merged
Merged
Changes from 20 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
33a3112
Fix I2S base frequency
Crypter d1496a4
Merge pull request #1 from Crypter/hotfix/i2s_frequency
Crypter f335b28
Update frequency dividers for I2S
Crypter b07cc34
Merge branch 'master' into master
earlephilhower a380742
Merge branch 'master' into master
Crypter 941e68e
fixed i2s_set_rate, added i2s_get_real_rate() and i2s_set_dividers
b56bc49
Minimise float calculations
Crypter 6df60c4
Merge branch 'master' into master
Crypter f5d676a
Merge branch 'master' into master
earlephilhower f67cff8
Merge branch 'master' into master
earlephilhower f2c9841
added optional callback after every DMA interrupt for better timing c…
bdc2d40
Merge branch 'master' into i2s-isr
a469864
Merge branch 'master' into i2s-isr
30bae68
Merge branch 'master' into i2s-isr
Crypter d964f8e
Merge branch 'master' into i2s-isr
Crypter da855ed
Merge branch 'master' into i2s-isr
Crypter 6c4b75f
Merge branch 'master' into i2s-isr
Crypter 8428695
Merge branch 'master' into i2s-isr
Crypter 126a79f
Merge branch 'master' into i2s-isr
Crypter 88778cf
Merge branch 'master' into i2s-isr
earlephilhower aad4453
Removed function from IRAM, added comment for better clarity
751b5db
Merge branch 'master' into i2s-isr
Crypter db9b12e
Merge branch 'master' into i2s-isr
earlephilhower 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,6 +51,7 @@ bool i2s_write_lr(int16_t left, int16_t right);//combines both channels and call | |
bool i2s_is_full();//returns true if DMA is full and can not take more bytes (overflow) | ||
bool i2s_is_empty();//returns true if DMA is empty (underflow) | ||
int16_t i2s_available();// returns the number of samples than can be written before blocking | ||
void i2s_set_callback(void (*callback) (void)); | ||
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. (continuing prior thought) |
||
|
||
#ifdef __cplusplus | ||
} | ||
|
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.
Now that 2.4.1 is out this can get into the merge queue. Only minor change I would request is to remove the ICACHE_FLASH_ATTR from the set-callback function. There's no need for this to be kept in precious IRAM.