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
6561310d
Commit
6561310d
authored
Feb 23, 2022
by
Earle F. Philhower, III
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor OOM check in PIO support routines
parent
bac6dae0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
cores/rp2040/SerialPIO.cpp
cores/rp2040/SerialPIO.cpp
+4
-0
No files found.
cores/rp2040/SerialPIO.cpp
View file @
6561310d
...
...
@@ -36,6 +36,10 @@ static pio_program_t *pio_make_uart_prog(int repl, const pio_program_t *pg) {
p
->
length
=
pg
->
length
;
p
->
origin
=
pg
->
origin
;
uint16_t
*
insn
=
(
uint16_t
*
)
malloc
(
p
->
length
*
2
);
if
(
!
insn
)
{
delete
p
;
return
nullptr
;
}
memcpy
(
insn
,
pg
->
instructions
,
p
->
length
*
2
);
insn
[
0
]
=
pio_encode_set
(
pio_x
,
repl
);
p
->
instructions
=
insn
;
...
...
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