Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-pico
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-pico
Commits
f57b5bc7
Unverified
Commit
f57b5bc7
authored
Jun 04, 2023
by
Earle F. Philhower, III
Committed by
GitHub
Jun 04, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add I2S::getOverUnderflow() (#1497)
See #1491. Thanks @LinusHeu
parent
35a4d573
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
docs/i2s.rst
docs/i2s.rst
+5
-0
libraries/I2S/src/I2S.h
libraries/I2S/src/I2S.h
+9
-0
No files found.
docs/i2s.rst
View file @
f57b5bc7
...
...
@@ -84,6 +84,11 @@ void flush()
~~~~~~~~~~~~
Waits until all the I2S buffers have been output.
void getOverUnderflow()
~~~~~~~~~~~~~~~~~~~~~~~
Returns a flag indicating if the I2S system ran our of data to send on output,
or had to throw away data on input.
size_t write(uint8_t/int8_t/int16_t/int32_t)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Writes a single sample of ``bitsPerSample`` to the buffer. It is up to the
...
...
libraries/I2S/src/I2S.h
View file @
f57b5bc7
...
...
@@ -54,6 +54,15 @@ public:
virtual
size_t
write
(
const
uint8_t
*
buffer
,
size_t
size
)
override
;
virtual
int
availableForWrite
()
override
;
// From the AR
bool
getOverUnderflow
()
{
if
(
!
_running
)
{
return
false
;
}
else
{
return
_arb
->
getOverUnderflow
();
}
}
// Try and make I2S::write() do what makes sense, namely write
// one sample (L or R) at the I2S configured bit width
virtual
size_t
write
(
uint8_t
s
)
override
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment