Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
lwc
/
compare
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Pipelines
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b0ec33ff
authored
5 years ago
by
Enrico Pozzobon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
faster uart on esp32
parent
d9156e69
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
5 deletions
+4
-5
templates/esp32/src/main.ino
+1
-1
templates/esp32/src/uartp.c
+2
-3
templates/esp32/test
+1
-1
No files found.
templates/esp32/src/main.ino
View file @
b0ec33ff
...
@@ -51,7 +51,7 @@ void my_assert(bool b) {
...
@@ -51,7 +51,7 @@ void my_assert(bool b) {
}
}
void
setup
()
{
void
setup
()
{
SerialOut
.
begin
(
1152
00
);
SerialOut
.
begin
(
5000
00
);
pinMode
(
CRYPTO_BUSY
,
OUTPUT
);
pinMode
(
CRYPTO_BUSY
,
OUTPUT
);
digitalWrite
(
CRYPTO_BUSY
,
HIGH
);
digitalWrite
(
CRYPTO_BUSY
,
HIGH
);
delay
(
100
);
delay
(
100
);
...
...
This diff is collapsed.
Click to expand it.
templates/esp32/src/uartp.c
View file @
b0ec33ff
...
@@ -36,16 +36,15 @@ void uartp_send(const void *src, uint16_t len) {
...
@@ -36,16 +36,15 @@ void uartp_send(const void *src, uint16_t len) {
uint16_t
uartp_recv
(
void
*
dst
,
uint16_t
buf_len
)
{
uint16_t
uartp_recv
(
void
*
dst
,
uint16_t
buf_len
)
{
uint8_t
*
buf
=
(
uint8_t
*
)
dst
;
uint8_t
*
buf
=
(
uint8_t
*
)
dst
;
uint8_t
tag
_old
,
tag
,
info
,
cs
;
uint8_t
tag
,
info
,
cs
;
uint16_t
len
;
uint16_t
len
;
tag
=
AMUX_END
;
tag
=
AMUX_END
;
while
(
1
)
{
while
(
1
)
{
do
{
do
{
tag_old
=
tag
;
tag
=
uart_rbyte
();
tag
=
uart_rbyte
();
}
while
(
tag
!=
AMUX_TAG
||
tag_old
!=
AMUX_END
);
}
while
(
tag
!=
AMUX_TAG
);
len
=
(
uint16_t
)
uart_rbyte
();
len
=
(
uint16_t
)
uart_rbyte
();
if
(
len
&
AMUX_EXT
)
{
if
(
len
&
AMUX_EXT
)
{
...
...
This diff is collapsed.
Click to expand it.
templates/esp32/test
View file @
b0ec33ff
...
@@ -115,7 +115,7 @@ def main(argv):
...
@@ -115,7 +115,7 @@ def main(argv):
eprint
(
"Flashed"
)
eprint
(
"Flashed"
)
time
.
sleep
(
0.1
)
time
.
sleep
(
0.1
)
ser
=
serial
.
Serial
(
dev
,
baudrate
=
1152
00
,
timeout
=
5
)
ser
=
serial
.
Serial
(
dev
,
baudrate
=
5000
00
,
timeout
=
5
)
uartp
=
UARTP
(
ser
)
uartp
=
UARTP
(
ser
)
ser
.
setDTR
(
False
)
# IO0=HIGH
ser
.
setDTR
(
False
)
# IO0=HIGH
...
...
This diff is collapsed.
Click to expand it.
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