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
a8e66347
Unverified
Commit
a8e66347
authored
Apr 25, 2024
by
Earle F. Philhower, III
Committed by
GitHub
Apr 25, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid swapping L/R channels on I2S input (#2124)
Fixes #2123
parent
bd8eb9bc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
libraries/I2S/src/pio_i2s.pio
libraries/I2S/src/pio_i2s.pio
+2
-2
libraries/I2S/src/pio_i2s.pio.h
libraries/I2S/src/pio_i2s.pio.h
+2
-2
No files found.
libraries/I2S/src/pio_i2s.pio
View file @
a8e66347
...
...
@@ -295,8 +295,8 @@ static inline void pio_i2s_in_program_init(PIO pio, uint sm, uint offset, uint d
pio_sm_exec(pio, sm, pio_encode_set(pio_y, bits - 2));
// Offset the data by 1 bit
pio_sm_exec(pio, sm, pio_encode_in(pio_pins, bits - 1));
pio_sm_exec(pio, sm, pio_encode_in(pio_pins, bits)); // Shift in 1st L data
pio_sm_exec(pio, sm, pio_encode_in(pio_pins, bits - 1));
// Shift in 1st R data modulo one bit, avoiding bit shift from #2037
}
%}
libraries/I2S/src/pio_i2s.pio.h
View file @
a8e66347
...
...
@@ -378,8 +378,8 @@ static inline void pio_i2s_in_program_init(PIO pio, uint sm, uint offset, uint d
pio_sm_set_pindirs_with_mask
(
pio
,
sm
,
pin_mask
,
pin_mask
);
pio_sm_set_pins
(
pio
,
sm
,
0
);
// clear pins
pio_sm_exec
(
pio
,
sm
,
pio_encode_set
(
pio_y
,
bits
-
2
));
// Offset the data by 1 bit
pio_sm_exec
(
pio
,
sm
,
pio_encode_in
(
pio_pins
,
bits
-
1
));
pio_sm_exec
(
pio
,
sm
,
pio_encode_in
(
pio_pins
,
bits
));
// Shift in 1st L data
pio_sm_exec
(
pio
,
sm
,
pio_encode_in
(
pio_pins
,
bits
-
1
));
// Shift in 1st R data modulo one bit, avoiding bit shift from #2037
}
#endif
...
...
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