Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SOAAP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Streitenberger
SOAAP
Commits
784778f6
Commit
784778f6
authored
1 year ago
by
RobertPatzke
Browse files
Options
Downloads
Patches
Plain Diff
Update 20230926 TestSerial mit Strings
parent
99b27243
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
sketches/TestSerial/TestSerial.h
+2
-1
2 additions, 1 deletion
sketches/TestSerial/TestSerial.h
sketches/TestSerial/TestSerial.ino
+49
-0
49 additions, 0 deletions
sketches/TestSerial/TestSerial.ino
with
51 additions
and
1 deletion
sketches/TestSerial/TestSerial.h
+
2
−
1
View file @
784778f6
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
#include
"nRF52840SerE.h"
#include
"nRF52840SerE.h"
#include
"ComRingBuf.h"
#include
"ComRingBuf.h"
#define TmpVerMsg "Version 2023092
3-10
"
#define TmpVerMsg "Version 2023092
5-4
"
#ifdef DebugTerminal
#ifdef DebugTerminal
// ****************************************************************************
// ****************************************************************************
...
@@ -36,6 +36,7 @@ void smPutCharRB();
...
@@ -36,6 +36,7 @@ void smPutCharRB();
void
smReadPtrRB
();
void
smReadPtrRB
();
void
smGetCntIntSer
();
void
smGetCntIntSer
();
void
smReadAllRB
();
void
smReadAllRB
();
void
smWriteStrRB
();
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
sketches/TestSerial/TestSerial.ino
+
49
−
0
View file @
784778f6
...
@@ -303,6 +303,7 @@ char *smCheckRBHelp =
...
@@ -303,6 +303,7 @@ char *smCheckRBHelp =
"B Zeichen in P2 eingeben
\r\n
"
"B Zeichen in P2 eingeben
\r\n
"
"I Anzahl der Interrupts anzeigen
\r\n
"
"I Anzahl der Interrupts anzeigen
\r\n
"
"R Inhalte der Empfangspuffer auslesen
\r\n
"
"R Inhalte der Empfangspuffer auslesen
\r\n
"
"Sx String in Px eingeben
\r\n
"
"Z Zeiger/Index der Ringpuffer anzeigen
\r\n
"
"Z Zeiger/Index der Ringpuffer anzeigen
\r\n
"
};
};
...
@@ -340,6 +341,11 @@ void smCheckRB()
...
@@ -340,6 +341,11 @@ void smCheckRB()
sm
.
userVar
=
1
;
sm
.
userVar
=
1
;
sm
.
enter
(
smReadAllRB
);
sm
.
enter
(
smReadAllRB
);
}
}
else
if
(
mon
.
lastKeyIn
==
'S'
||
mon
.
lastKeyIn
==
's'
)
{
sm
.
userVar
=
0
;
sm
.
enter
(
smWriteStrRB
);
}
else
if
(
mon
.
lastKeyIn
==
'Z'
||
mon
.
lastKeyIn
==
'z'
)
else
if
(
mon
.
lastKeyIn
==
'Z'
||
mon
.
lastKeyIn
==
'z'
)
{
{
sm
.
userVar
=
1
;
sm
.
userVar
=
1
;
...
@@ -454,5 +460,48 @@ void smReadAllRB()
...
@@ -454,5 +460,48 @@ void smReadAllRB()
sm
.
userVar
++
;
sm
.
userVar
++
;
}
}
char
smWrStNr
;
void
smWriteStrRB
()
{
if
(
sm
.
firstEnter
())
{
mon
.
print
((
char
*
)
"String (Endezeichen TAB) eingeben für Puffer "
);
}
if
(
mon
.
lastKeyIn
==
':'
)
return
;
if
(
sm
.
userVar
<
1
)
{
if
(
mon
.
lastKeyIn
<
'1'
||
mon
.
lastKeyIn
>
'2'
)
return
;
smWrStNr
=
mon
.
lastKeyIn
;
mon
.
cprint
(
smWrStNr
);
mon
.
cprint
(
':'
);
mon
.
cprint
(
' '
);
sm
.
userVar
++
;
mon
.
lastKeyIn
=
':'
;
return
;
}
if
(
mon
.
lastKeyIn
!=
'\t'
)
{
tmpCharBuf
[
sm
.
userVar
-
1
]
=
mon
.
lastKeyIn
;
mon
.
cprint
(
mon
.
lastKeyIn
);
sm
.
userVar
++
;
mon
.
lastKeyIn
=
':'
;
return
;
}
tmpCharBuf
[
sm
.
userVar
-
1
]
=
'\0'
;
if
(
smWrStNr
==
'1'
)
crb1
.
putStr
((
char
*
)
tmpCharBuf
);
else
if
(
smWrStNr
==
'2'
)
crb2
.
putStr
((
char
*
)
tmpCharBuf
);
mon
.
println
();
mon
.
lastKeyIn
=
':'
;
sm
.
enter
(
smCheckRB
);
}
#endif // DebugTerminal
#endif // DebugTerminal
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment